summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--compat/limits.hpp3
-rw-r--r--serialize/savegame.cpp11
2 files changed, 4 insertions, 10 deletions
diff --git a/compat/limits.hpp b/compat/limits.hpp
index 93c66951..ffad9c7c 100644
--- a/compat/limits.hpp
+++ b/compat/limits.hpp
@@ -35,7 +35,4 @@ template<> struct limits<double>
using integer_type = int64_t;
};
-template<typename T> requires std::is_integral_v<T> using int_max = typename limits<T>::max;
-template<typename T> requires std::is_integral_v<T> using int_min = typename limits<T>::min;
-
} // namespace floormat
diff --git a/serialize/savegame.cpp b/serialize/savegame.cpp
index bc2e2f5f..d5bbb914 100644
--- a/serialize/savegame.cpp
+++ b/serialize/savegame.cpp
@@ -447,18 +447,15 @@ struct writer final : visitor_<writer>
switch (type)
{
- case atlas_type::ground: name = reinterpret_cast<const ground_atlas*>(atlas)->name(); goto ok;
- case atlas_type::wall: name = reinterpret_cast<const wall_atlas*>(atlas)->name(); goto ok;
+ case atlas_type::ground: name = reinterpret_cast<const ground_atlas*>(atlas)->name(); break;
+ case atlas_type::wall: name = reinterpret_cast<const wall_atlas*>(atlas)->name(); break;
case atlas_type::vobj:
case atlas_type::anim:
name = reinterpret_cast<const anim_atlas*>(atlas)->name();
- goto ok;
- case atlas_type::none:
break;
+ default:
+ fm_abort("invalid atlas type '%d'", (int)type);
}
- fm_abort("invalid atlas type '%d'", (int)type);
-
-ok:
do_visit(intern_string(name), f);
}