From 5e237222744953630a5a815eafba16ba67f8d764 Mon Sep 17 00:00:00 2001 From: Beq Date: Fri, 17 May 2024 11:06:55 +0100 Subject: [PATCH] Fix formatting and modernise --- indra/llxml/llxmltree.cpp | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/indra/llxml/llxmltree.cpp b/indra/llxml/llxmltree.cpp index 739996ecfa..a33f41c69e 100644 --- a/indra/llxml/llxmltree.cpp +++ b/indra/llxml/llxmltree.cpp @@ -123,16 +123,21 @@ LLXmlTreeNode::LLXmlTreeNode( const std::string& name, LLXmlTreeNode* parent, LL { } +// Fix formatting and modernise +// I don't even think the for loops are needed though. 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 )