diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-06 22:47:20 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-06 22:47:20 +0200 |
commit | ed90a4cec86f4e8beb38c69fc2aaa0c7bfa84b7b (patch) | |
tree | 5a224daf40d3d6585580bb639dc23ce14f2430bf /serialize/json-helper.hpp | |
parent | 9107e0ff64fc5788d90c0b44da3f7148cba4f966 (diff) |
a
Diffstat (limited to 'serialize/json-helper.hpp')
-rw-r--r-- | serialize/json-helper.hpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/serialize/json-helper.hpp b/serialize/json-helper.hpp index 86c6a16f..6be7f74c 100644 --- a/serialize/json-helper.hpp +++ b/serialize/json-helper.hpp @@ -18,7 +18,6 @@ struct json_helper final { template<typename t> std::tuple<t, bool> json_helper::from_json(const std::filesystem::path& pathname) { - using namespace nlohmann; using Corrade::Utility::Error; std::ifstream s; s.exceptions(s.exceptions() | std::ios::failbit | std::ios::badbit); @@ -29,10 +28,9 @@ std::tuple<t, bool> json_helper::from_json(const std::filesystem::path& pathname return {}; } t ret; - json j; + nlohmann::json j; s >> j; - using nlohmann::from_json; - from_json(j, ret); + ret = j; return { std::move(ret), true }; } |