This commit is contained in:
Siarhei Fedartsou 2024-05-25 21:48:19 +02:00
parent 08b505a1cf
commit bb0ab44ee1
2 changed files with 4 additions and 4 deletions

View File

@ -41,7 +41,7 @@ inline bool hasValidLanes(const guidance::IntermediateIntersection &intersection
return intersection.lanes.lanes_in_turn > 0; return intersection.lanes.lanes_in_turn > 0;
} }
util::json::Array coordinateToLonLat(const util::Coordinate &coordinate); util::json::Value coordinateToLonLat(const util::Coordinate &coordinate);
/** /**
* Ensures that a bearing value is a whole number, and clamped to the range 0-359 * Ensures that a bearing value is a whole number, and clamped to the range 0-359
@ -79,7 +79,7 @@ util::json::Object makeGeoJSONGeometry(ForwardIter begin, ForwardIter end)
coordinates.values.push_back(location); coordinates.values.push_back(location);
coordinates.values.push_back(location); coordinates.values.push_back(location);
} }
geojson.values["coordinates"] = std::move(coordinates); geojson.values["coordinates"] = util::json::Value{std::move(coordinates)};
return geojson; return geojson;
} }

View File

@ -74,12 +74,12 @@ std::string waypointTypeToString(const guidance::WaypointType waypoint_type)
return waypoint_type_names[static_cast<std::size_t>(waypoint_type)]; return waypoint_type_names[static_cast<std::size_t>(waypoint_type)];
} }
util::json::Array coordinateToLonLat(const util::Coordinate &coordinate) util::json::Value coordinateToLonLat(const util::Coordinate &coordinate)
{ {
util::json::Array array; util::json::Array array;
array.values.push_back(static_cast<double>(util::toFloating(coordinate.lon))); array.values.push_back(static_cast<double>(util::toFloating(coordinate.lon)));
array.values.push_back(static_cast<double>(util::toFloating(coordinate.lat))); array.values.push_back(static_cast<double>(util::toFloating(coordinate.lat)));
return array; return util::json::Value{std::move(array)};
} }
} // namespace detail } // namespace detail