summaryrefslogtreecommitdiff
path: root/indra/llxml
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llxml')
-rw-r--r--indra/llxml/CMakeLists.txt3
-rw-r--r--indra/llxml/llxmlnode.cpp3
-rw-r--r--indra/llxml/llxmltree.cpp19
3 files changed, 17 insertions, 8 deletions
diff --git a/indra/llxml/CMakeLists.txt b/indra/llxml/CMakeLists.txt
index 508c2b919b..03ac4bc9f2 100644
--- a/indra/llxml/CMakeLists.txt
+++ b/indra/llxml/CMakeLists.txt
@@ -4,6 +4,7 @@ project(llxml)
include(00-Common)
include(LLCommon)
+include(LLWindow)
set(llxml_SOURCE_FILES
llcontrol.cpp
@@ -31,9 +32,11 @@ target_link_libraries( llxml
llmath
llcommon
ll::expat
+ ll::SDL
)
target_include_directories( llxml INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
+include(LibraryInstall)
# tests
diff --git a/indra/llxml/llxmlnode.cpp b/indra/llxml/llxmlnode.cpp
index 2298dc22e7..d1c800dc7d 100644
--- a/indra/llxml/llxmlnode.cpp
+++ b/indra/llxml/llxmlnode.cpp
@@ -29,6 +29,9 @@
#include <iostream>
#include <map>
+#if LL_SDL
+#include <SDL_rwops.h>
+#endif
#include "llxmlnode.h"
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 )