summaryrefslogtreecommitdiff
path: root/indra/llxml
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2025-03-11 05:10:11 +0200
committerAndrey Lihatskiy <alihatskiy@productengine.com>2025-03-11 05:10:11 +0200
commit4132a13972b3a76af22ba3d274be30be3680acc2 (patch)
tree31ae40090192ede34d1dcb00ecc254ebe203ef0a /indra/llxml
parent573ca63e0f837fd52cbfc8adc3546d8971d21b12 (diff)
parent95a395de2287858aac39a41e1a360eab4ef7315f (diff)
Merge branch 'marchcat/maint-b-cherrypicks' into marchcat/2025.03-maint-b
Diffstat (limited to 'indra/llxml')
-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();
}