From 496dfe31ce1def677f051ff0f7cd512f1b523478 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Thu, 13 Jun 2013 22:50:35 +0000 Subject: [PATCH] Remove extraneous constructor for XML_Node --- include/cantera/base/xml.h | 11 +---------- .../cantera/transport/LiquidTranInteraction.h | 2 +- src/base/xml.cpp | 18 ------------------ 3 files changed, 2 insertions(+), 29 deletions(-) diff --git a/include/cantera/base/xml.h b/include/cantera/base/xml.h index 705a4f7fa..685f6b725 100644 --- a/include/cantera/base/xml.h +++ b/include/cantera/base/xml.h @@ -100,15 +100,6 @@ public: class XML_Node { public: - //! Default constructor for XML_Node, representing a tree structure - /*! - * Constructor for an XML_Node, which is a node in a tree-like structure - * representing an XML file. - * - * @param cnm Name of the node. The default name of the node is "`--`" - */ - XML_Node(const char* cnm = 0); - //! Constructor for XML_Node, representing a tree structure /*! * @param nm Name of the node. @@ -116,7 +107,7 @@ public: * @param parent Pointer to the parent for this node in the tree. * A value of 0 indicates this is the top of the tree. */ - XML_Node(const std::string& nm, XML_Node* const parent); + explicit XML_Node(const std::string& nm="--", XML_Node* const parent=0); XML_Node(const XML_Node& right); XML_Node& operator=(const XML_Node& right); diff --git a/include/cantera/transport/LiquidTranInteraction.h b/include/cantera/transport/LiquidTranInteraction.h index 3b34527a0..316828bb6 100644 --- a/include/cantera/transport/LiquidTranInteraction.h +++ b/include/cantera/transport/LiquidTranInteraction.h @@ -120,7 +120,7 @@ public: * @param compModelNode `` XML node * @param thermo Pointer to thermo object */ - virtual void init(const XML_Node& compModelNode = 0, + virtual void init(const XML_Node& compModelNode = XML_Node(), thermo_t* thermo = 0); virtual void setParameters(LiquidTransportParams& trParam) { diff --git a/src/base/xml.cpp b/src/base/xml.cpp index 1accd5324..df9d1ecf7 100644 --- a/src/base/xml.cpp +++ b/src/base/xml.cpp @@ -309,24 +309,6 @@ std::string XML_Reader::readValue() ////////////////////////// XML_Node ///////////////////////////////// -XML_Node::XML_Node(const char* cnm) : - m_name(""), - m_value(""), - m_parent(0), - m_root(0), - m_locked(false), - m_nchildren(0), - m_iscomment(false) , - m_linenum(0) -{ - if (! cnm) { - m_name = "--"; - } else { - m_name = cnm; - } - m_root = this; -} - XML_Node::XML_Node(const std::string& nm, XML_Node* const parent_) : m_name(nm), m_value(""),