Decompile fn_00891 (JsonCppLoader::GetMapStringBoolValue)
Batch #11523 by Yommy: 0 byte-identical, 1 confirmed by peer review. - fn_00891 JsonCppLoader::GetMapStringBoolValue: logic confirmed by peer review Peer-reviewed-by: KWDev, Tanke, cremane Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
parent
c46115658e
commit
e18477a710
1 changed files with 4 additions and 2 deletions
|
|
@ -15,12 +15,14 @@ bool JsonCppLoader::GetMapStringBoolValue(const JsonValue& node, const std::stri
|
|||
|
||||
const JsonObject& members = value.GetObject();
|
||||
for (JsonObject::const_iterator member = members.begin(); member != members.end(); ++member) {
|
||||
if (member->second.GetType() != JsonValue::BOOL_VALUE) {
|
||||
std::string name = member->first;
|
||||
JsonValue element = member->second;
|
||||
if (element.GetType() != JsonValue::BOOL_VALUE) {
|
||||
this->Fail("잘못된 데이터가 입력되었습니다. boolValue 가 입력되어야 합니다. (keyName : %s)", key.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!out->insert(std::make_pair(member->first, member->second.AsBool())).second) {
|
||||
if (!out->insert(std::make_pair(name, element.AsBool())).second) {
|
||||
this->Fail("중복키가 입력되었습니다. (keyName : %s)", key.c_str());
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue