From 8382bc2dcfe613652f59c3118fa21d47b874f647 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 7 Apr 2024 10:03:14 +0200 Subject: use static_cast on void* instead of reinterpret_cast --- serialize/savegame.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'serialize') diff --git a/serialize/savegame.cpp b/serialize/savegame.cpp index 8e7039e5..34e90993 100644 --- a/serialize/savegame.cpp +++ b/serialize/savegame.cpp @@ -460,11 +460,11 @@ struct writer final : visitor_ switch (type) { - case atlas_type::ground: name = reinterpret_cast(atlas)->name(); break; - case atlas_type::wall: name = reinterpret_cast(atlas)->name(); break; + case atlas_type::ground: name = static_cast(atlas)->name(); break; + case atlas_type::wall: name = static_cast(atlas)->name(); break; case atlas_type::vobj: case atlas_type::anim: - name = reinterpret_cast(atlas)->name(); + name = static_cast(atlas)->name(); break; default: fm_abort("invalid atlas type '%d'", (int)type); @@ -896,7 +896,7 @@ struct reader final : visitor_ auto a = atlases[id]; fm_soft_assert(a.type == Type); using atlas_type = typename atlas_from_type::Type; - const auto* atlas = reinterpret_cast(a.atlas); + const auto* atlas = static_cast(a.atlas); return atlas->name(); } -- cgit v1.2.3