From 6df8b245f9bbae846593488a547240748baba2ea Mon Sep 17 00:00:00 2001 From: Tom Isaacson Date: Sun, 17 Dec 2023 09:16:43 +1300 Subject: [PATCH] Remove unnecessary duplicate of v_copy_node_children() and add default parameter. --- node_set.cpp | 6 ------ node_set.h | 3 +-- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/node_set.cpp b/node_set.cpp index 07bfd83..31d1e2d 100644 --- a/node_set.cpp +++ b/node_set.cpp @@ -49,12 +49,6 @@ node_set& node_set::operator=(const node_set& ns2) { return *this; } -/// Copy all element children of a node to the node_set -void node_set::v_copy_node_children(const XMLNode* XNp_root) ///< The father of the nodes to be copied -{ - v_copy_node_children(XNp_root, nullptr); -} - /// Copy all element children of a node to the node_set, if their name matches a given name void node_set::v_copy_node_children(const XMLNode* XNp_root, ///< The father of the nodes to be copied const char* cp_lookup) ///< Lookup name (or nullptr) diff --git a/node_set.h b/node_set.h index 83f0b92..6ba3f3b 100644 --- a/node_set.h +++ b/node_set.h @@ -141,8 +141,7 @@ class node_set { return atof(S_get_value(u_which).c_str()); } - void v_copy_node_children(const tinyxml2::XMLNode* XNp_root); - void v_copy_node_children(const tinyxml2::XMLNode* XNp_root, const char* cp_lookup); + void v_copy_node_children(const tinyxml2::XMLNode* XNp_root, const char* cp_lookup = nullptr); void v_copy_selected_node_recursive(const tinyxml2::XMLNode* XNp_root); void v_copy_selected_node_recursive(const tinyxml2::XMLNode* XNp_root, const char* cp_lookup); void v_copy_selected_node_recursive_no_attrib(const tinyxml2::XMLNode* XNp_root, const char* cp_lookup);