Commit df3cb2db authored by Alexander Lapshin's avatar Alexander Lapshin

refactor

parent 42c2294b
......@@ -554,23 +554,6 @@ template <typename T> void PutValue(jsonalloc& alc, jsonval& ss, const std::stri
ss.AddMember(jname, obj, alc);
}
template <typename T> void PutValue(jsonalloc& alc, jsonval& ss, const std::vector<T>& vec)
{
for (const auto& el : vec) {
PutValue(alc, ss, el);
}
}
template <typename T> void PutValue(jsonalloc& alc, jsonval& ss, const std::vector<T>& vec, bool (*f)(rapidjson::Document::AllocatorType&, jsonval&, const T&))
{
for (auto it = vec.begin(); it != vec.end(); ++it) {
jsonval child(rapidjson::kObjectType);
if (f(alc, child, *it)) {
ss.PushBack(child, alc);
}
}
}
template <typename T> void PutValue(jsonalloc& alc, jsonval& ss, const std::string& conName, const std::vector<T>& vec, bool (*f)(rapidjson::Document::AllocatorType&, jsonval&, const T&))
{
jsonval jsvec(rapidjson::kArrayType);
......@@ -734,17 +717,6 @@ static void PutValue(jsonalloc& alc, jsonval& ss, const std::string& conName, co
ss.AddMember(jname, jvalue, alc);
}
static void PutValue(jsonalloc& alc, jsonval& ss, const double value)
{
ss.PushBack(value, alc);
}
static void PutValue(jsonalloc& alc, jsonval& ss, const std::string& value)
{
jsonval jvalue(value, alc);
ss.PushBack(jvalue, alc);
}
static void flushjson(const jsondoc& outroot, const std::string& outputfile, const bool pretty = true)
{
if (!outputfile.length()) {
......
......@@ -3,7 +3,7 @@
std::string exec(const char* cmd)
{
#ifndef WIN32
#ifndef MSVC
FILE* pipe = popen(cmd, "r");
#else
FILE* pipe = _popen(cmd, "r");
......@@ -17,7 +17,7 @@ std::string exec(const char* cmd)
result += buffer;
}
#ifndef WIN32
#ifndef MSVC
pclose(pipe);
#else
_pclose(pipe);
......
#pragma once
#ifndef MSVC
#pragma GCC diagnostic ignored "-Wnon-template-friend"
#endif
template <typename T> class svalue
{
public:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment