From e2076fa741ed64f49f96bbbdc89dad4497794706 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 24 Jan 2024 03:58:06 +0100 Subject: c --- serialize/savegame.cpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'serialize') diff --git a/serialize/savegame.cpp b/serialize/savegame.cpp index 0bc18d32..965f4fca 100644 --- a/serialize/savegame.cpp +++ b/serialize/savegame.cpp @@ -698,10 +698,22 @@ void world::serialize(StringView filename) namespace { template struct atlas_from_type; -template<> struct atlas_from_type { using Type = ground_atlas; static StringView name(void* ptr) { return reinterpret_cast(ptr)->name(); } }; -template<> struct atlas_from_type { using Type = wall_atlas; static StringView name(void* ptr) { return reinterpret_cast(ptr)->name(); }}; -template<> struct atlas_from_type { using Type = anim_atlas; static StringView name(void* ptr) { return reinterpret_cast(ptr)->name(); } }; -template<> struct atlas_from_type { using Type = anim_atlas; static StringView name(void* ptr) { return reinterpret_cast(ptr)->name(); } }; +template<> struct atlas_from_type { + using Type = ground_atlas; + static StringView name(void* ptr) { return reinterpret_cast(ptr)->name(); } +}; +template<> struct atlas_from_type { + using Type = wall_atlas; + static StringView name(void* ptr) { return reinterpret_cast(ptr)->name(); } +}; +template<> struct atlas_from_type { + using Type = anim_atlas; + static StringView name(void* ptr) { return reinterpret_cast(ptr)->name(); } +}; +template<> struct atlas_from_type { + using Type = anim_atlas; + static StringView name(void* ptr) { return reinterpret_cast(ptr)->name(); } +}; struct reader final : visitor_ { -- cgit v1.2.3