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/llxuixml/lltrans.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/llxuixml/lltrans.cpp') diff --git a/indra/llxuixml/lltrans.cpp b/indra/llxuixml/lltrans.cpp index d6f17dbb08..bf38e925c6 100644 --- a/indra/llxuixml/lltrans.cpp +++ b/indra/llxuixml/lltrans.cpp @@ -72,7 +72,8 @@ bool LLTrans::parseStrings(LLXMLNodePtr &root, const std::set& defa } StringTable string_table; - LLXUIParser::instance().readXUI(root, string_table, xml_filename); + LLXUIParser parser; + parser.readXUI(root, string_table, xml_filename); if (!string_table.validateBlock()) { @@ -115,7 +116,8 @@ bool LLTrans::parseLanguageStrings(LLXMLNodePtr &root) } StringTable string_table; - LLXUIParser::instance().readXUI(root, string_table, xml_filename); + LLXUIParser parser; + parser.readXUI(root, string_table, xml_filename); if (!string_table.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/llxuixml/lltrans.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/llxuixml/lltrans.cpp') diff --git a/indra/llxuixml/lltrans.cpp b/indra/llxuixml/lltrans.cpp index bf56461bac..11127a53f5 100644 --- a/indra/llxuixml/lltrans.cpp +++ b/indra/llxuixml/lltrans.cpp @@ -78,8 +78,8 @@ bool LLTrans::parseStrings(LLXMLNodePtr &root, const std::set& defa sStringTemplates.clear(); sDefaultArgs.clear(); - for(LLInitParam::ParamIterator::const_iterator it = string_table.strings().begin(); - it != string_table.strings().end(); + for(LLInitParam::ParamIterator::const_iterator it = string_table.strings.begin(); + it != string_table.strings.end(); ++it) { LLTransTemplate xml_template(it->name, it->value); @@ -119,8 +119,8 @@ bool LLTrans::parseLanguageStrings(LLXMLNodePtr &root) return false; } - for(LLInitParam::ParamIterator::const_iterator it = string_table.strings().begin(); - it != string_table.strings().end(); + for(LLInitParam::ParamIterator::const_iterator it = string_table.strings.begin(); + it != string_table.strings.end(); ++it) { // share the same map with parseStrings() so we can search the strings using the same getString() function.- angela -- cgit v1.2.3