Changed xml constructors to make them simpler with less implicit
conversion routines. Trying to figure out what the issue is with the pc interface's /MD vs /MDd problems.
This commit is contained in:
parent
0d78e48c26
commit
e7078147b3
5 changed files with 33 additions and 4 deletions
|
|
@ -41,7 +41,7 @@ extern "C" {
|
|||
if (!name)
|
||||
x = new XML_Node;
|
||||
else
|
||||
x = new XML_Node(string(name));
|
||||
x = new XML_Node(name);
|
||||
return Cabinet<XML_Node>::cabinet(true)->add(x);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
/*
|
||||
* $Id$
|
||||
*/
|
||||
#ifndef CT_INCL_ZERODIM_H
|
||||
#define CT_INCL_ZERODIM_H
|
||||
#include "kernel/Reactor.h"
|
||||
|
|
|
|||
|
|
@ -346,7 +346,7 @@ namespace mdp {
|
|||
if (MDP_ALLO_errorOption == 7 ||
|
||||
MDP_ALLO_errorOption == 5 || MDP_ALLO_errorOption == 3 ||
|
||||
MDP_ALLO_errorOption == 1) {
|
||||
(void) fprintf(stderr, "smalloc ERROR: Non-positive argument. (%d)\n", n);
|
||||
(void) fprintf(stderr, "smalloc ERROR: Non-positive argument. (%d)\n", (int) n);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
|
@ -361,7 +361,7 @@ namespace mdp {
|
|||
MDP_ALLO_errorOption == 5 || MDP_ALLO_errorOption == 3 ||
|
||||
MDP_ALLO_errorOption == 1) {
|
||||
fprintf(stderr, "smalloc : Out of space - number of bytes "
|
||||
"requested = %d\n", n);
|
||||
"requested = %d\n", (int) n);
|
||||
}
|
||||
}
|
||||
#ifdef MDP_MEMDEBUG
|
||||
|
|
|
|||
|
|
@ -391,6 +391,21 @@ namespace Cantera {
|
|||
|
||||
////////////////////////// XML_Node /////////////////////////////////
|
||||
|
||||
XML_Node::XML_Node(const char * cnm)
|
||||
: m_value(""),
|
||||
m_parent(0),
|
||||
m_locked(false),
|
||||
m_nchildren(0),
|
||||
m_iscomment(false)
|
||||
{
|
||||
if (! cnm) {
|
||||
m_name = "--";
|
||||
} else {
|
||||
m_name = cnm;
|
||||
}
|
||||
m_root = this;
|
||||
}
|
||||
|
||||
// Default constructor for XML_Node, representing a tree structure
|
||||
/*
|
||||
* Constructor for an XML_Node, which is a node in a tree-like structure
|
||||
|
|
|
|||
|
|
@ -156,6 +156,17 @@ namespace Cantera {
|
|||
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);
|
||||
|
||||
|
||||
//! Default constructor for XML_Node, representing a tree structure
|
||||
/*!
|
||||
* Constructor for an XML_Node, which is a node in a tree-like structure
|
||||
|
|
@ -167,7 +178,7 @@ namespace Cantera {
|
|||
* @param p pointer to the root for this node in the tree.
|
||||
* The default is 0 indicating this is the top of the tree.
|
||||
*/
|
||||
XML_Node(const std::string nm = "--", XML_Node * const p = 0);
|
||||
XML_Node(const std::string nm, XML_Node * const p);
|
||||
|
||||
//! Copy constructor
|
||||
/*!
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue