From d13358b71ec15085f2638fd9c3fc634df62dfc94 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 9 May 2021 13:56:46 -0400 Subject: Reduced dependency on json-related hacks --- src/utils.h | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'src/utils.h') diff --git a/src/utils.h b/src/utils.h index dea052b..71041a7 100644 --- a/src/utils.h +++ b/src/utils.h @@ -106,7 +106,7 @@ namespace utils { return std::vector(begin(data), end(data)); } - template std::vector> jsonList2ptrvec(const std::string& type, const std::vector& names) { + template std::vector> instantiateNames(const std::string& type, const std::vector& names) { std::vector> ret; for(auto name : names) { auto j = utils::loadJson(type, name); @@ -114,20 +114,4 @@ namespace utils { } return ret; } - - template std::vector> json2ptrvec(const nlohmann::json& data) { - std::vector> ret; - for(nlohmann::json d : data) { - ret.push_back(T::create(d)); - } - return ret; - } - - template std::vector ptrvec2json(std::vector src) { - std::vector ret; - for(T i : src) { - ret.push_back(i->toJson()); - } - return ret; - } } -- cgit v1.2.3