Revert "Folds json_* utilities into json subfolder and adapts includes"

This reverts commit cd039c69c0a92a35889e3c875b8eb53cf07377bb.
This commit is contained in:
Daniel J. Hofmann
2016-02-12 15:23:33 -08:00
parent c9f0158fdb
commit 4b8c0ac143
12 changed files with 35 additions and 29 deletions
@@ -33,9 +33,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <variant/variant.hpp>
#include <iostream>
#include <vector>
#include <string>
#include <utility>
#include <unordered_map>
namespace osrm
@@ -52,16 +52,16 @@ struct Array;
struct String
{
String() = default;
String(const char *value_) : value{value_} {}
String(std::string value_) : value{std::move(value_)} {}
String() {}
String(const char *value) : value(value) {}
String(std::string value) : value(std::move(value)) {}
std::string value;
};
struct Number
{
Number() = default;
Number(double value_) : value{value_} {}
Number() {}
Number(double value) : value(static_cast<double>(value)) {}
double value;
};
@@ -95,7 +95,7 @@ struct Array
std::vector<Value> values;
};
} // namespace json
} // namespace JSON
} // namespace util
} // namespace osrm
@@ -9,11 +9,6 @@
#include "osrm/json_container.hpp"
#include <ostream>
#include <vector>
#include <iterator>
#include <string>
namespace osrm
{
namespace util
@@ -128,11 +123,23 @@ struct ArrayRenderer
out.push_back(']');
}
void operator()(const True &) const { out.insert(end(out), {'t', 'r', 'u', 'e'}); }
void operator()(const True &) const
{
const std::string temp("true");
out.insert(out.end(), temp.begin(), temp.end());
}
void operator()(const False &) const { out.insert(end(out), {'f', 'a', 'l', 's', 'e'}); }
void operator()(const False &) const
{
const std::string temp("false");
out.insert(out.end(), temp.begin(), temp.end());
}
void operator()(const Null &) const { out.insert(end(out), {'n', 'u', 'l', 'l'}); }
void operator()(const Null &) const
{
const std::string temp("null");
out.insert(out.end(), temp.begin(), temp.end());
}
private:
std::vector<char> &out;
+2 -2
View File
@@ -1,8 +1,8 @@
#ifndef MATCHING_DEBUG_INFO_HPP
#define MATCHING_DEBUG_INFO_HPP
#include "util/json/logger.hpp"
#include "util/json/util.hpp"
#include "util/json_logger.hpp"
#include "util/json_util.hpp"
#include "engine/map_matching/hidden_markov_model.hpp"
#include "osrm/coordinate.hpp"