From 5edb4f2171fb92ff64913459a63afb20474db25a Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Thu, 15 Oct 2009 19:56:45 +0000 Subject: removed requirement for specializing ParamCompare on boost::function types eliminated usage of iterator_range from LLInitParam made LLTextEditor::addChar consistent with truncate in counting text bytes (not including null terminator) EXT-1494 - Avatar profile description text truncated to 255 characters reviewed by Leyla --- indra/llxuixml/llinitparam.cpp | 41 ++++++++--------------------------------- 1 file changed, 8 insertions(+), 33 deletions(-) (limited to 'indra/llxuixml/llinitparam.cpp') diff --git a/indra/llxuixml/llinitparam.cpp b/indra/llxuixml/llinitparam.cpp index 1b867b79c9..1abd411f37 100644 --- a/indra/llxuixml/llinitparam.cpp +++ b/indra/llxuixml/llinitparam.cpp @@ -127,7 +127,7 @@ namespace LLInitParam bool BaseBlock::submitValue(const Parser::name_stack_t& name_stack, Parser& p, bool silent) { - if (!deserializeBlock(p, boost::make_iterator_range(name_stack.begin(), name_stack.end()))) + if (!deserializeBlock(p, std::make_pair(name_stack.begin(), name_stack.end()))) { if (!silent) { @@ -304,11 +304,11 @@ namespace LLInitParam bool BaseBlock::deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack) { BlockDescriptor& block_data = getBlockDescriptor(); - bool names_left = !name_stack.empty(); + bool names_left = name_stack.first != name_stack.second; if (names_left) { - const std::string& top_name = name_stack.front().first; + const std::string& top_name = name_stack.first->first; ParamDescriptor::deserialize_func_t deserialize_func = NULL; Param* paramp = NULL; @@ -331,10 +331,11 @@ namespace LLInitParam } } - Parser::name_stack_range_t new_name_stack(++name_stack.begin(), name_stack.end()); + Parser::name_stack_range_t new_name_stack(name_stack.first, name_stack.second); + ++new_name_stack.first; if (deserialize_func) { - return deserialize_func(*paramp, p, new_name_stack, name_stack.empty() ? -1 : name_stack.front().second); + return deserialize_func(*paramp, p, new_name_stack, name_stack.first == name_stack.second ? -1 : name_stack.first->second); } } @@ -346,7 +347,7 @@ namespace LLInitParam Param* paramp = getParamFromHandle((*it)->mParamHandle); ParamDescriptor::deserialize_func_t deserialize_func = (*it)->mDeserializeFunc; - if (deserialize_func && deserialize_func(*paramp, p, name_stack, name_stack.empty() ? -1 : name_stack.front().second)) + if (deserialize_func && deserialize_func(*paramp, p, name_stack, name_stack.first == name_stack.second ? -1 : name_stack.first->second)) { mLastChangedParam = (*it)->mParamHandle; return true; @@ -499,33 +500,7 @@ namespace LLInitParam return param_changed; } - - template<> - bool ParamCompare >::equals( - const boost::function &a, - const boost::function &b) - { - return false; - } - - template<> - bool ParamCompare >::equals( - const boost::function &a, - const boost::function &b) - { - return false; - } - - template<> - bool ParamCompare >::equals( - const boost::function &a, - const boost::function &b) - { - return false; - } - - template<> - bool ParamCompare::equals(const LLSD &a, const LLSD &b) + bool ParamCompare::equals(const LLSD &a, const LLSD &b) { return false; } -- cgit v1.2.3 From 2ff7f8a772e07335e4ab6788410858667189059e Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Thu, 15 Oct 2009 21:35:30 +0000 Subject: fix for gcc build --- indra/llxuixml/llinitparam.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llxuixml/llinitparam.cpp') diff --git a/indra/llxuixml/llinitparam.cpp b/indra/llxuixml/llinitparam.cpp index 1abd411f37..6dd1f93baf 100644 --- a/indra/llxuixml/llinitparam.cpp +++ b/indra/llxuixml/llinitparam.cpp @@ -500,7 +500,7 @@ namespace LLInitParam return param_changed; } - bool ParamCompare::equals(const LLSD &a, const LLSD &b) + bool ParamCompare::equals(const LLSD &a, const LLSD &b) { return false; } -- cgit v1.2.3