Skip to content

Commit

Permalink
Get rid of unused functions in util/json_util.hpp (#6446)
Browse files Browse the repository at this point in the history
  • Loading branch information
SiarheiFedartsou authored Nov 6, 2022
1 parent aeaf5e0 commit 5f82d0c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 47 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
22 changes: 0 additions & 22 deletions include/util/container.hpp

This file was deleted.

25 changes: 0 additions & 25 deletions include/util/json_util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#define JSON_UTIL_HPP

#include "osrm/json_container.hpp"
#include "util/container.hpp"

#include <cmath>
#include <limits>
Expand All @@ -27,30 +26,6 @@ template <typename T> T clamp_float(T d)

return d;
}

template <typename... Args> 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 <typename... Keys> Value &get(Value &value, const char *key, Keys... keys)
{
using recursive_object_t = mapbox::util::recursive_wrapper<Object>;
return get(value.get<recursive_object_t>().get().values[key], keys...);
}

template <typename... Keys> Value &get(Value &value, unsigned key, Keys... keys)
{
using recursive_array_t = mapbox::util::recursive_wrapper<Array>;
return get(value.get<recursive_array_t>().get().values[key], keys...);
}

} // namespace json
} // namespace util
} // namespace osrm
Expand Down

0 comments on commit 5f82d0c

Please sign in to comment.