Address some of the remaining issues of the code review

This commit is contained in:
Patrick Niklaus
2015-03-04 01:34:45 +01:00
parent de261d28ef
commit 98dba11c5e
4 changed files with 15 additions and 21 deletions
+4 -2
View File
@@ -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
View File
@@ -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;
}