diff --git a/include/engine/api/nearest_api.hpp b/include/engine/api/nearest_api.hpp index 841a3bf02..2eeb4e8da 100644 --- a/include/engine/api/nearest_api.hpp +++ b/include/engine/api/nearest_api.hpp @@ -42,10 +42,12 @@ class NearestAPI final : public BaseAPI auto waypoint = MakeWaypoint(phantom_node); waypoint.values["distance"] = phantom_with_distance.distance; + + util::json::Array nodes; - std::uint64_t from_node = static_cast(SPECIAL_OSM_NODEID); - std::uint64_t to_node = static_cast(SPECIAL_OSM_NODEID); + std::uint64_t from_node = 0; + std::uint64_t to_node = 0; std::vector forward_geometry; if (phantom_node.forward_segment_id.enabled ) diff --git a/unit_tests/library/nearest.cpp b/unit_tests/library/nearest.cpp index a1b6f669d..bbf06624e 100644 --- a/unit_tests/library/nearest.cpp +++ b/unit_tests/library/nearest.cpp @@ -109,9 +109,9 @@ BOOST_AUTO_TEST_CASE(test_nearest_response_for_location_in_small_component) const auto &nodes = waypoint_object.values.at("nodes").get().values; BOOST_CHECK(nodes.size() == 2); BOOST_CHECK(nodes[0].get().value != - static_cast(SPECIAL_OSM_NODEID)); + 0); BOOST_CHECK(nodes[1].get().value != - static_cast(SPECIAL_OSM_NODEID)); + 0); } }