From 12c662cf02929814df27dec374f4e427d3afee74 Mon Sep 17 00:00:00 2001 From: Siarhei Fedartsou Date: Sat, 25 May 2024 21:18:29 +0200 Subject: [PATCH] wip --- include/util/geojson_debug_policy_toolkit.hpp | 6 +++++- src/partitioner/partitioner.cpp | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/util/geojson_debug_policy_toolkit.hpp b/include/util/geojson_debug_policy_toolkit.hpp index bcc36a3aa..86ac51752 100644 --- a/include/util/geojson_debug_policy_toolkit.hpp +++ b/include/util/geojson_debug_policy_toolkit.hpp @@ -102,10 +102,14 @@ inline util::json::Object makeFeature(std::string type, inline util::json::Array makeJsonArray(const std::vector &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 diff --git a/src/partitioner/partitioner.cpp b/src/partitioner/partitioner.cpp index e8544bf64..dbed86bb1 100644 --- a/src/partitioner/partitioner.cpp +++ b/src/partitioner/partitioner.cpp @@ -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"