Skip to content

Commit

Permalink
fix minor mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
kolomenkin committed May 8, 2022
1 parent e5a1755 commit ea054ab
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions DataSerializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,18 @@ bool DataSerializer::load(const std::string& filename, const std::function<ItemV
for (auto iter = doc.MemberBegin(); iter != iterEnd; ++iter)
{
const auto& name = iter->name;
const auto& value = iter->value;
if (!name.IsString())
{
LOG_ERROR << "JSON object element name is not a string. Type: "
<< static_cast<int>(name.GetType()) << std::endl;
return false;
}

const auto& value = iter->value;
if (!value.IsString())
{
LOG_ERROR << "JSON object element value is not a string. Type: "
<< static_cast<int>(name.GetType()) << "; name: " << name.GetString() << std::endl;
<< static_cast<int>(value.GetType()) << "; name: " << name.GetString() << std::endl;
return false;
}

Expand Down

0 comments on commit ea054ab

Please sign in to comment.