diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2024-04-09 17:25:42 +0200 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-04-09 17:26:31 +0200 |
| commit | f3e2276b09d156eb455c801aac5a07e969185f4f (patch) | |
| tree | f6fcccbfc657d109e2f7c08b3c60f5df83aa6752 | |
| parent | 40e0ab421193c6fbc861e42e3952cf35d0d47bcf (diff) | |
w
| -rw-r--r-- | serialize/savegame.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/serialize/savegame.cpp b/serialize/savegame.cpp index 822b68e7..69d50183 100644 --- a/serialize/savegame.cpp +++ b/serialize/savegame.cpp @@ -178,7 +178,7 @@ struct visitor_ CORRADE_ALWAYS_INLINE Derived& derived() { return static_cast<Derived&>(*this); } template<Enum E, typename F> requires (!IsWriter) CORRADE_ALWAYS_INLINE void visit(E& x, F&& f) - { using U = std::underlying_type_t<std::remove_cvref_t<E>>; auto xʹ = U(x); f(xʹ); } + { using U = std::underlying_type_t<std::remove_cvref_t<E>>; auto xʹ = U(0); f(xʹ); x = E(xʹ); } template<Enum E, typename F> requires (IsWriter) CORRADE_ALWAYS_INLINE void visit(E x, F&& f) { using U = std::underlying_type_t<E>; f(static_cast<U>(x)); } |
