From 150948c5cd962237436a81c61a81a9cbb453f2e4 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 9 Apr 2024 16:40:27 +0200 Subject: b --- serialize/binary-reader.hpp | 8 ++++---- serialize/binary-serializer.hpp | 4 ++-- serialize/binary-writer.hpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'serialize') diff --git a/serialize/binary-reader.hpp b/serialize/binary-reader.hpp index ebe7ffde..6dc65723 100644 --- a/serialize/binary-reader.hpp +++ b/serialize/binary-reader.hpp @@ -1,7 +1,7 @@ #pragma once #include "binary-serializer.hpp" #include -#include +//#include #include namespace floormat::Serialize { @@ -26,7 +26,7 @@ template struct binary_reader final { template explicit constexpr binary_reader(const Seq& seq) noexcept; constexpr binary_reader(It begin, It end) noexcept; - constexpr void assert_end() noexcept(false); + constexpr CORRADE_ALWAYS_INLINE void assert_end() noexcept(false); constexpr size_t bytes_read() const noexcept { return num_bytes_read; } template constexpr T read() noexcept(false); @@ -47,10 +47,10 @@ private: }; template -constexpr void operator<<(T& x, binary_reader& reader) noexcept(false); +constexpr CORRADE_ALWAYS_INLINE void operator<<(T& x, binary_reader& reader) noexcept(false); template -constexpr void operator>>(binary_reader& reader, T& x) noexcept(false); +constexpr CORRADE_ALWAYS_INLINE void operator>>(binary_reader& reader, T& x) noexcept(false); template binary_reader(It&& begin, It&& end) -> binary_reader>; diff --git a/serialize/binary-serializer.hpp b/serialize/binary-serializer.hpp index f277aae9..c95bedef 100644 --- a/serialize/binary-serializer.hpp +++ b/serialize/binary-serializer.hpp @@ -31,13 +31,13 @@ concept serializable = requires(T x) { }; template -constexpr inline T maybe_byteswap(T x) noexcept +constexpr CORRADE_ALWAYS_INLINE T maybe_byteswap(T x) noexcept { return x; } template -constexpr inline T maybe_byteswap(T x) noexcept +constexpr CORRADE_ALWAYS_INLINE T maybe_byteswap(T x) noexcept { if constexpr(std::endian::native == std::endian::big) return std::byteswap(x); diff --git a/serialize/binary-writer.hpp b/serialize/binary-writer.hpp index 54e70a5c..cf1e9fd0 100644 --- a/serialize/binary-writer.hpp +++ b/serialize/binary-writer.hpp @@ -19,6 +19,6 @@ private: }; template It, serializable T> -constexpr binary_writer& operator<<(binary_writer& writer, T x) noexcept; +constexpr CORRADE_ALWAYS_INLINE binary_writer& operator<<(binary_writer& writer, T x) noexcept; } // namespace floormat::Serialize -- cgit v1.2.3