Skip to content

Commit

Permalink
fix incorrect boolean checks in json conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
AO-StreetArt committed Jan 24, 2019
1 parent eae1034 commit fe0269d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/api/json_scene_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ JsonSceneList::JsonSceneList(const rapidjson::Document& d) {
itr.FindMember("active");
if (active_iter != itr.MemberEnd()) {
SceneList::logger().debug("Active flag found");
if (!(active_iter->value.IsBool())) {
if (active_iter->value.IsBool()) {
scd->set_active(active_iter->value.GetBool());
}
}
Expand All @@ -231,7 +231,7 @@ JsonSceneList::JsonSceneList(const rapidjson::Document& d) {
itr.FindMember("public");
if (public_iter != itr.MemberEnd()) {
SceneList::logger().debug("Public flag found");
if (!(public_iter->value.IsBool())) {
if (public_iter->value.IsBool()) {
scd->set_public(public_iter->value.GetBool());
}
}
Expand All @@ -240,7 +240,7 @@ JsonSceneList::JsonSceneList(const rapidjson::Document& d) {
itr.FindMember("private");
if (private_iter != itr.MemberEnd()) {
SceneList::logger().debug("Private flag found");
if (!(private_iter->value.IsBool())) {
if (private_iter->value.IsBool()) {
scd->set_public(!(private_iter->value.GetBool()));
}
}
Expand Down

0 comments on commit fe0269d

Please sign in to comment.