summaryrefslogtreecommitdiff
path: root/indra/llxml/llxmltree.cpp
diff options
context:
space:
mode:
authorKitty Barnett <develop@catznip.com>2024-09-30 15:54:20 +0200
committerKitty Barnett <develop@catznip.com>2024-09-30 15:54:20 +0200
commited2d4f02d93459bf114ebeab8727d507b7bfc0ef (patch)
treea216907e2c01db7932c83e212319cb7a8c790013 /indra/llxml/llxmltree.cpp
parenta8d8314cb9af193ea7ce95456fb308217ba28e3c (diff)
parenta409503653bebacbc498409806f9e1a4b97ed6ac (diff)
Merge branch 'develop' into rlva/base
Diffstat (limited to 'indra/llxml/llxmltree.cpp')
-rw-r--r--indra/llxml/llxmltree.cpp13
1 files changed, 8 insertions, 5 deletions
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();
}