From 65c9914d23022df6a39db50ce295750f08695893 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 23 Aug 2010 11:03:19 -0700 Subject: made Params parsers not act as singletons --- indra/llui/lluicolortable.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/llui/lluicolortable.cpp') diff --git a/indra/llui/lluicolortable.cpp b/indra/llui/lluicolortable.cpp index 1b64ef3abe..88140f1a49 100644 --- a/indra/llui/lluicolortable.cpp +++ b/indra/llui/lluicolortable.cpp @@ -243,7 +243,8 @@ void LLUIColorTable::saveUserSettings() const } LLXMLNodePtr output_node = new LLXMLNode("colors", false); - LLXUIParser::instance().writeXUI(output_node, params); + LLXUIParser parser; + parser.writeXUI(output_node, params); if(!output_node->isNull()) { @@ -309,7 +310,8 @@ bool LLUIColorTable::loadFromFilename(const std::string& filename, string_color_ } Params params; - LLXUIParser::instance().readXUI(root, params, filename); + LLXUIParser parser; + parser.readXUI(root, params, filename); if(params.validateBlock()) { -- cgit v1.2.3 From 0edb695ea86d7997ae3952e155ed5b4922c799f8 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 22 Sep 2010 14:48:18 -0700 Subject: instead of exposing mutable container in LLInitParam::Multiple, just expose access functions, begin(), end(), etc. this allows mutation of param block contents, without being able to change number of elements --- indra/llui/lluicolortable.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llui/lluicolortable.cpp') diff --git a/indra/llui/lluicolortable.cpp b/indra/llui/lluicolortable.cpp index 219c70500a..0641f6d175 100644 --- a/indra/llui/lluicolortable.cpp +++ b/indra/llui/lluicolortable.cpp @@ -56,8 +56,8 @@ void LLUIColorTable::insertFromParams(const Params& p, string_color_map_t& table typedef std::map string_string_map_t; string_string_map_t unresolved_refs; - for(LLInitParam::ParamIterator::const_iterator it = p.color_entries().begin(); - it != p.color_entries().end(); + for(LLInitParam::ParamIterator::const_iterator it = p.color_entries.begin(); + it != p.color_entries.end(); ++it) { ColorEntryParams color_entry = *it; -- cgit v1.2.3