diff options
author | Richard Linden <none@none> | 2010-09-16 00:42:01 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2010-09-16 00:42:01 -0700 |
commit | f07c4f5bdc2358f65cc0aafe2b793c9854e0958a (patch) | |
tree | ef89ce2e7831b85d19326e269fb130a5db59720c | |
parent | dcebc0114907e9cc1f78b239edc93138a4b5c0e4 (diff) |
streamlined llsd serialization logic of param blocks
-rw-r--r-- | indra/llui/llsdparam.cpp | 25 |
1 files 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; } |