Address some of the remaining issues of the code review
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
|
||||
Copyright (c) 2015, Project OSRM, Dennis Luxen, others
|
||||
Copyright (c) 2015, Project OSRM contributors
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
@@ -37,6 +37,8 @@ namespace osrm
|
||||
namespace json
|
||||
{
|
||||
|
||||
// Used to append additional debugging information to the JSON response in a
|
||||
// thread safe manner.
|
||||
class Logger
|
||||
{
|
||||
using MapT = std::unordered_map<std::string, osrm::json::Value>;
|
||||
@@ -74,4 +76,4 @@ class Logger
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* SIMPLE_LOGGER_HPP */
|
||||
#endif /* JSON_LOGGER_HPP */
|
||||
|
||||
+2
-10
@@ -30,8 +30,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <osrm/json_container.hpp>
|
||||
|
||||
#include <limits>
|
||||
#include <cmath>
|
||||
#include <limits>
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
@@ -53,18 +53,10 @@ template <typename T> T clamp_float(T d)
|
||||
return d;
|
||||
}
|
||||
|
||||
void append_to_array(osrm::json::Array &a) {}
|
||||
template <typename T, typename... Args>
|
||||
void append_to_array(osrm::json::Array &a, T value, Args... args)
|
||||
{
|
||||
a.values.emplace_back(value);
|
||||
append_to_array(a, args...);
|
||||
}
|
||||
|
||||
template <typename... Args> osrm::json::Array make_array(Args... args)
|
||||
{
|
||||
osrm::json::Array a;
|
||||
append_to_array(a, args...);
|
||||
append_to_container(a.values, args...);
|
||||
return a;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user