summaryrefslogtreecommitdiff
path: root/indra/llxml/llxmltree.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2025-03-19 00:03:19 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2025-03-19 00:03:42 +0200
commit969ed536806dce1fe2fa8fc9b312f1c80e671d84 (patch)
tree3e8c7e74cbecf7aefe250b03a72651dd781bf8ed /indra/llxml/llxmltree.cpp
parentf462037b8e3474115a1f039ce0cd56c98e320227 (diff)
parentc99e3167ed8549bc13d7df03b1e12dc15b0a080f (diff)
Merge branch 'release/2025.03' into release/2025.04
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();
}