X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Flayers.cpp;h=2209847241e46d4b4dc39de803f02983a5100efd;hb=ef1b8f5fa4c2e939e9b6f08069ee08d362ee0ee5;hp=3205323e3d2d19df035db0aaa6ec12f93cdd988e;hpb=6e444881b679e72388f4bc76d5372f62f7f61145;p=staging%2Fwindowmanager.git diff --git a/src/layers.cpp b/src/layers.cpp index 3205323..2209847 100644 --- a/src/layers.cpp +++ b/src/layers.cpp @@ -27,19 +27,19 @@ using json = nlohmann::json; layer::layer(nlohmann::json const &j) { DB(j); if (j["type"] == "range") { - this->id_min = get(j["first_surface_id"]); - this->id_max = get(j["last_surface_id"]); + this->id_min = j["first_surface_id"]; + this->id_max = j["last_surface_id"]; } else { - this->id_min = this->id_max = get(j["surface_id"]); + this->id_min = this->id_max = j["surface_id"]; } this->name = j["name"].get(); - this->layer_id = get(j["layer_id"]); + this->layer_id = j["layer_id"]; this->rect = genivi::full_rect; if (j["area"]["type"] == "rect") { auto jr = j["area"]["rect"]; this->rect = genivi::rect{ - get(jr["width"]), get(jr["height"]), - get(jr["x"]), get(jr["y"]), + jr["width"], jr["height"], + jr["x"], jr["y"], }; } } @@ -82,8 +82,8 @@ struct result to_layer_map(nlohmann::json const &j) { std::transform(std::cbegin(jtests), std::cend(jtests), std::back_inserter(tests), [](json const &j) { return std::make_pair( - get(j["surface_id"]), - get(j["expect_layer_id"])); + j["surface_id"], + j["expect_layer_id"]); }); for (auto sid : tests) {