diff options
author | Beq Janus <beqjanus@gmail.com> | 2024-05-17 16:48:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-17 18:48:03 +0300 |
commit | 4fbb190453200c12169fdcc3e151df2fa73c0db4 (patch) | |
tree | e1fc0ce515dcf003311890c5af5a0f7d6171ba8d /indra/llxml | |
parent | 0022bd07f87cdcde74434143bf6294d5c139dfa9 (diff) |
fix bad indentation and modernise (#1503)
Diffstat (limited to 'indra/llxml')
-rw-r--r-- | indra/llxml/llxmltree.cpp | 19 |
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 ) |