diff options
Diffstat (limited to 'indra/llxml')
-rw-r--r-- | indra/llxml/llxmlnode.cpp | 1 | ||||
-rw-r--r-- | indra/llxml/llxmlnode.h | 2 | ||||
-rw-r--r-- | indra/llxml/llxmlparser.h | 2 | ||||
-rw-r--r-- | indra/llxml/llxmltree.cpp | 13 |
4 files changed, 11 insertions, 7 deletions
diff --git a/indra/llxml/llxmlnode.cpp b/indra/llxml/llxmlnode.cpp index 48805f8240..8a2c36a307 100644 --- a/indra/llxml/llxmlnode.cpp +++ b/indra/llxml/llxmlnode.cpp @@ -309,6 +309,7 @@ void LLXMLNode::addChild(LLXMLNodePtr& new_child) // virtual LLXMLNodePtr LLXMLNode::createChild(const char* name, bool is_attribute) { + // Todo: validate to make sure node name is valid? (no spaces, etc) return createChild(gStringTable.addStringEntry(name), is_attribute); } diff --git a/indra/llxml/llxmlnode.h b/indra/llxml/llxmlnode.h index 09c7c4fdad..769cf97ba2 100644 --- a/indra/llxml/llxmlnode.h +++ b/indra/llxml/llxmlnode.h @@ -30,7 +30,7 @@ #ifndef XML_STATIC #define XML_STATIC #endif -#ifdef LL_USESYSTEMLIBS +#if 1 #include <expat.h> #else #include "expat/expat.h" diff --git a/indra/llxml/llxmlparser.h b/indra/llxml/llxmlparser.h index 0f64def6df..9c25727e54 100644 --- a/indra/llxml/llxmlparser.h +++ b/indra/llxml/llxmlparser.h @@ -30,7 +30,7 @@ #ifndef XML_STATIC #define XML_STATIC #endif -#ifdef LL_USESYSTEMLIBS +#if 1 #include <expat.h> #else #include "expat/expat.h" diff --git a/indra/llxml/llxmltree.cpp b/indra/llxml/llxmltree.cpp index 164b3156e1..d66544d0f8 100644 --- a/indra/llxml/llxmltree.cpp +++ b/indra/llxml/llxmltree.cpp @@ -108,12 +108,15 @@ LLXmlTreeNode::LLXmlTreeNode( const std::string& name, LLXmlTreeNode* parent, LL LLXmlTreeNode::~LLXmlTreeNode() { - attribute_map_t::iterator iter; - for (iter=mAttributes.begin(); iter != mAttributes.end(); iter++) - delete iter->second; - for(LLXmlTreeNode* node : mChildren) + for (auto& attr : mAttributes) + { + delete attr.second; + } + mAttributes.clear(); + + for (auto& child : mChildren) { - delete node; + delete child; } mChildren.clear(); } |