summaryrefslogtreecommitdiff
path: root/indra/llxml
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-05-30 11:02:31 -0400
committerNat Goodspeed <nat@lindenlab.com>2024-05-30 11:02:31 -0400
commitdfdb88305e4612c54f190c1ba237bdb609224d74 (patch)
tree23f73597a41f8db0cc0c98b64255d620e931ba20 /indra/llxml
parent5ed8df22cd59680a685c4ada7daa5555bf59d4fe (diff)
parent4189cb74421794ba123bf8724caa843c9d9d1c78 (diff)
Merge branch 'release/maint-b' into nat/catch-test-blown-stack.
Retargeting PR #1496 to Maint B.
Diffstat (limited to 'indra/llxml')
-rw-r--r--indra/llxml/llxmltree.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/indra/llxml/llxmltree.cpp b/indra/llxml/llxmltree.cpp
index baf2e6a951..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 )