diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-12-02 03:53:23 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-12-02 03:53:23 +0100 |
commit | 9a0ac7c7fd06a60f0e61b88828eaa59c0ee30fdd (patch) | |
tree | d8166bea565e13e6337b4bd3dc2fb8be027d69b5 /serialize/binary-serializer.hpp | |
parent | e76fae1b2f007efc58ef46ecc248d271676c6673 (diff) |
serialize: work on recovering from corrupted saves
Diffstat (limited to 'serialize/binary-serializer.hpp')
-rw-r--r-- | serialize/binary-serializer.hpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/serialize/binary-serializer.hpp b/serialize/binary-serializer.hpp index 057b3c4d..338173c2 100644 --- a/serialize/binary-serializer.hpp +++ b/serialize/binary-serializer.hpp @@ -10,12 +10,6 @@ namespace floormat::Serialize { static_assert(std::endian::native == std::endian::big || std::endian::native == std::endian::little); -enum class value_type : unsigned char { - none, uc, u8, u16, u32, u64, - f32, f64, - COUNT -}; - template<std::size_t N> struct make_integer; template<std::size_t N> using make_integer_t = typename make_integer<N>::type; @@ -39,13 +33,13 @@ concept serializable = requires(T x) { }; template<typename T> -constexpr inline T maybe_byteswap(T x) +constexpr inline T maybe_byteswap(T x) noexcept { return x; } template<integer T> -constexpr inline T maybe_byteswap(T x) +constexpr inline T maybe_byteswap(T x) noexcept { if constexpr(std::endian::native == std::endian::big) return std::byteswap(x); |