summaryrefslogtreecommitdiff
path: root/indra/llxml
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-09-23 16:49:28 -0400
committerNat Goodspeed <nat@lindenlab.com>2024-09-23 16:49:28 -0400
commit626920dda38a512b27c5e8fd79b0c9b09be01898 (patch)
tree89c54e31848048ee084005fd3a0a1316f5530966 /indra/llxml
parentf6b3b5e803b0c08d55ecd10eac3e9e75518760a9 (diff)
parentd8e52ec001c476a2320f2d5caceb813465d707e4 (diff)
Merge remote branch 'develop' into release/luau-scripting for 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();
}