From f07c4f5bdc2358f65cc0aafe2b793c9854e0958a Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 16 Sep 2010 00:42:01 -0700 Subject: streamlined llsd serialization logic of param blocks --- indra/llui/llsdparam.cpp | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/indra/llui/llsdparam.cpp b/indra/llui/llsdparam.cpp index e3cadf4998..f97f80ab6c 100644 --- a/indra/llui/llsdparam.cpp +++ b/indra/llui/llsdparam.cpp @@ -29,6 +29,7 @@ // Project includes #include "llsdparam.h" +#include "llsdutil.h" static LLInitParam::Parser::parser_read_func_map_t sReadFuncs; static LLInitParam::Parser::parser_write_func_map_t sWriteFuncs; @@ -162,28 +163,7 @@ LLSD* LLParamSDParser::getSDWriteNode(const parser_t::name_stack_t& name_stack) } } - LLSD* child_sd = NULL; - if (it->first.empty()) - { - if (sd_to_write->isUndefined()) - { - *sd_to_write = LLSD::emptyArray(); - child_sd = sd_to_write; - } - else if (sd_to_write->isArray()) - { - child_sd = sd_to_write; - } - else - { - // go ahead and use the empty string as a map key - child_sd = &(*sd_to_write)[""]; - } - } - else - { - child_sd = &(*sd_to_write)[it->first]; - } + LLSD* child_sd = &(*sd_to_write)[it->first]; if (child_sd->isArray()) { @@ -222,6 +202,7 @@ LLSD* LLParamSDParser::getSDWriteNode(const parser_t::name_stack_t& name_stack) } mNameStack = name_stack; + //llinfos << ll_pretty_print_sd(*mWriteRootSD) << llendl; return sd_to_write; } -- cgit v1.2.3