Alchemy llcharacter and llcommon merge pass.

This commit is contained in:
Shyotl
2017-03-31 02:08:03 -05:00
parent f95be54bd5
commit 1230748ef5
61 changed files with 301 additions and 304 deletions

View File

@@ -30,7 +30,6 @@
// Project includes
#include "llsdparam.h"
#include "llsdutil.h"
#include "boost/bind.hpp"
static LLInitParam::Parser::parser_read_func_map_t sReadFuncs;
static LLInitParam::Parser::parser_write_func_map_t sWriteFuncs;
@@ -44,10 +43,8 @@ LLTrace::BlockTimerStatHandle FTM_SD_PARAM_ADAPTOR("LLSD to LLInitParam conversi
//
LLParamSDParser::LLParamSDParser()
: Parser(sReadFuncs, sWriteFuncs, sInspectFuncs),
mCurReadSD(NULL), mCurWriteSD(NULL), mWriteRootSD(NULL)
mCurReadSD(NULL), mWriteRootSD(NULL)
{
using boost::bind;
if (sReadFuncs.empty())
{
registerParserFuncs<LLInitParam::Flag>(readFlag, &LLParamSDParser::writeFlag);
@@ -100,7 +97,7 @@ void LLParamSDParser::readSD(const LLSD& sd, LLInitParam::BaseBlock& block, bool
mNameStack.clear();
setParseSilently(silent);
LLParamSDParserUtilities::readSDValues(boost::bind(&LLParamSDParser::submit, this, boost::ref(block), _1, _2), sd, mNameStack);
LLParamSDParserUtilities::readSDValues(std::bind(&LLParamSDParser::submit, this, std::ref(block), std::placeholders::_1, std::placeholders::_2), sd, mNameStack);
//readSDValues(sd, block);
}
@@ -281,14 +278,14 @@ void LLParamSDParserUtilities::readSDValues(read_sd_cb_t cb, const LLSD& sd, LLI
}
else if (sd.isUndefined())
{
if (!cb.empty())
if (cb)
{
cb(NO_VALUE_MARKER, stack);
}
}
else
{
if (!cb.empty())
if (cb)
{
cb(sd, stack);
}
@@ -337,7 +334,7 @@ namespace LLInitParam
if (!p.writeValue<LLSD>(mValue, name_stack_range))
{
// otherwise read from LLSD value and serialize out to parser (which could be LLSD, XUI, etc)
LLParamSDParserUtilities::readSDValues(boost::bind(&serializeElement, boost::ref(p), _1, _2), mValue, name_stack_range);
LLParamSDParserUtilities::readSDValues(std::bind(&serializeElement, std::ref(p), std::placeholders::_1, std::placeholders::_2), mValue, name_stack_range);
}
return true;
}