From 0e05afdac5c8864080748f2c2c30b0743fd80d1a Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Wed, 6 Oct 2010 19:41:55 -0700 Subject: allow passing LLSD arguments on command line --- indra/llxml/llcontrol.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'indra/llxml/llcontrol.cpp') diff --git a/indra/llxml/llcontrol.cpp b/indra/llxml/llcontrol.cpp index f9a39826f5..2822b767e5 100644 --- a/indra/llxml/llcontrol.cpp +++ b/indra/llxml/llcontrol.cpp @@ -170,6 +170,19 @@ LLSD LLControlVariable::getComparableValue(const LLSD& value) storable_value = false; } } + else if (TYPE_LLSD == type() && value.isString()) + { + LLPointer parser = new LLSDNotationParser; + LLSD result; + if (parser->parse(std::stringstream(value.asString()), result, LLSDSerialize::SIZE_UNLIMITED) != LLSDParser::PARSE_FAILURE) + { + storable_value = result; + } + else + { + storable_value = value; + } + } else { storable_value = value; -- cgit v1.2.3 From 0fa63baf3781430d835b859094b7d2b35ae3b32b Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 7 Oct 2010 11:30:55 -0700 Subject: fix for gcc --- indra/llxml/llcontrol.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/llxml/llcontrol.cpp') diff --git a/indra/llxml/llcontrol.cpp b/indra/llxml/llcontrol.cpp index 2822b767e5..85d369b8cd 100644 --- a/indra/llxml/llcontrol.cpp +++ b/indra/llxml/llcontrol.cpp @@ -174,7 +174,8 @@ LLSD LLControlVariable::getComparableValue(const LLSD& value) { LLPointer parser = new LLSDNotationParser; LLSD result; - if (parser->parse(std::stringstream(value.asString()), result, LLSDSerialize::SIZE_UNLIMITED) != LLSDParser::PARSE_FAILURE) + std::stringstream value_stream(value.asString()); + if (parser->parse(value_stream, result, LLSDSerialize::SIZE_UNLIMITED) != LLSDParser::PARSE_FAILURE) { storable_value = result; } -- cgit v1.2.3