diff options
author | Erik Kundiman <erik@megapahit.org> | 2024-06-20 16:16:37 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2024-06-20 20:52:45 +0800 |
commit | ad5dec92bcb7d11e6a48b6ec6a220a49de985351 (patch) | |
tree | 3870c4c7f1c9521c6ad40d1cfe1b1d8fc39882ef /indra/llxml | |
parent | 16299d3a3631e4c42367cf40410ad6995e585384 (diff) | |
parent | a65bc46b138b89200586b29fe729cbc7b0f0c8c4 (diff) |
Merge remote-tracking branch 'secondlife/release/maint-b' into maint-b
Diffstat (limited to 'indra/llxml')
-rw-r--r-- | indra/llxml/llxmltree.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/indra/llxml/llxmltree.cpp b/indra/llxml/llxmltree.cpp index c9da53daae..cd41aa6f2d 100644 --- a/indra/llxml/llxmltree.cpp +++ b/indra/llxml/llxmltree.cpp @@ -108,14 +108,17 @@ 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) - { - delete node; - } - mChildren.clear(); + for (auto& attr : mAttributes) + { + delete attr.second; + } + mAttributes.clear(); + + for (auto& child : mChildren) + { + delete child; + } + mChildren.clear(); } void LLXmlTreeNode::dump( const std::string& prefix ) |