diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-10 21:27:08 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-10 22:17:43 +0100 |
commit | ee1a527191db646850ee919b8fe3a6f8cb6cd693 (patch) | |
tree | a1ff23b8c0f93d689d51d3837caefaa72b9480cd /serialize/tile-atlas.cpp | |
parent | 0e23ba9e5a565e34fee0f024e29ce162f420ec22 (diff) |
get rid of std::string
Diffstat (limited to 'serialize/tile-atlas.cpp')
-rw-r--r-- | serialize/tile-atlas.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/serialize/tile-atlas.cpp b/serialize/tile-atlas.cpp index 8caaedd3..451fb48c 100644 --- a/serialize/tile-atlas.cpp +++ b/serialize/tile-atlas.cpp @@ -1,5 +1,6 @@ #include "src/tile-atlas.hpp" #include "serialize/tile-atlas.hpp" +#include "serialize/corrade-string.hpp" #include "serialize/magnum-vector2i.hpp" #include "loader.hpp" #include <tuple> @@ -10,8 +11,6 @@ using namespace floormat; namespace nlohmann { -using proxy_atlas = std::tuple<std::string, Vector2ub>; - void adl_serializer<std::shared_ptr<tile_atlas>>::to_json(json& j, const std::shared_ptr<const tile_atlas>& x) { using nlohmann::to_json; @@ -27,7 +26,7 @@ void adl_serializer<std::shared_ptr<tile_atlas>>::from_json(const json& j, std:: x = nullptr; else { - proxy_atlas proxy = j; + std::tuple<String, Vector2ub> proxy = j; const auto& [name, num_tiles] = proxy; x = loader.tile_atlas(name, num_tiles); } |