This commit is contained in:
Siarhei Fedartsou 2024-05-25 21:18:29 +02:00
parent 076ce82032
commit 12c662cf02
2 changed files with 5 additions and 2 deletions

View File

@ -102,10 +102,14 @@ inline util::json::Object makeFeature(std::string type,
inline util::json::Array makeJsonArray(const std::vector<util::Coordinate> &input_coordinates)
{
util::json::Array coordinates;
CoordinateToJsonArray converter;
std::transform(input_coordinates.begin(),
input_coordinates.end(),
std::back_inserter(coordinates.values),
CoordinateToJsonArray());
[&converter](const auto &coordinate)
{ return json::Value{converter(coordinate)}; });
return coordinates;
}
} // namespace osrm::util

View File

@ -15,7 +15,6 @@
#include "util/coordinate.hpp"
#include "util/geojson_debug_logger.hpp"
#include "util/geojson_debug_policies.hpp"
#include "util/integer_range.hpp"
#include "util/json_container.hpp"
#include "util/log.hpp"