summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeq Janus <beqjanus@gmail.com>2024-05-17 16:48:03 +0100
committerAndrey Lihatskiy <alihatskiy@productengine.com>2025-03-11 04:21:01 +0200
commit4de07d71ab3326869be78a7f76c2f114d8743849 (patch)
treeac7c36b26ed4363f74ae94936009fcb90369d850
parent5eb210586d0e14e6d6fb51151533138a1b81071e (diff)
fix bad indentation and modernise (#1503)
# Conflicts: # 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();
}