diff --git a/CHANGELOG.md b/CHANGELOG.md index d7b462d2e..104145e68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - CHANGED: Update actions/cache to v3. [#6420](https://github.com/Project-OSRM/osrm-backend/pull/6420) - REMOVED: Drop support of Node 12 & 14. [#6431](https://github.com/Project-OSRM/osrm-backend/pull/6431) - Misc: + - REMOVED: Get rid of unused functions in util/json_util.hpp. [#6446](https://github.com/Project-OSRM/osrm-backend/pull/6446) - FIXED: Apply workaround for Conan installation issue on CI. [#6442](https://github.com/Project-OSRM/osrm-backend/pull/6442) - FIXED: Fix `npm audit` warnings in NPM package. [#6437](https://github.com/Project-OSRM/osrm-backend/pull/6437) - FIXED: Handle snapping parameter for all plugins in NodeJs bindings, but not for Route only. [#6417](https://github.com/Project-OSRM/osrm-backend/pull/6417) diff --git a/include/util/container.hpp b/include/util/container.hpp deleted file mode 100644 index 68ab7e526..000000000 --- a/include/util/container.hpp +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef CONTAINER_HPP -#define CONTAINER_HPP - -#include - -namespace osrm -{ -namespace util -{ - -template void append_to_container(Container &&) {} - -template -void append_to_container(Container &&container, T value, Args &&... args) -{ - container.emplace_back(value); - append_to_container(std::forward(container), std::forward(args)...); -} -} // namespace util -} // namespace osrm - -#endif diff --git a/include/util/json_util.hpp b/include/util/json_util.hpp index 32a1bd7e4..311263d4e 100644 --- a/include/util/json_util.hpp +++ b/include/util/json_util.hpp @@ -2,7 +2,6 @@ #define JSON_UTIL_HPP #include "osrm/json_container.hpp" -#include "util/container.hpp" #include #include @@ -27,30 +26,6 @@ template T clamp_float(T d) return d; } - -template Array make_array(Args... args) -{ - Array a; - // TODO: check why a.values.emplace_back(args...); is not an option here - append_to_container(a.values, args...); - return a; -} - -// Easy acces to object hierachies -inline Value &get(Value &value) { return value; } - -template Value &get(Value &value, const char *key, Keys... keys) -{ - using recursive_object_t = mapbox::util::recursive_wrapper; - return get(value.get().get().values[key], keys...); -} - -template Value &get(Value &value, unsigned key, Keys... keys) -{ - using recursive_array_t = mapbox::util::recursive_wrapper; - return get(value.get().get().values[key], keys...); -} - } // namespace json } // namespace util } // namespace osrm