summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--serialize/binary-reader.hpp8
-rw-r--r--serialize/binary-serializer.hpp4
-rw-r--r--serialize/binary-writer.hpp2
3 files changed, 7 insertions, 7 deletions
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 <array>
-#include <iterator>
+//#include <iterator>
#include <Corrade/Containers/StringView.h>
namespace floormat::Serialize {
@@ -26,7 +26,7 @@ template<string_input_iterator It>
struct binary_reader final {
template<char_sequence Seq> 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<serializable T> constexpr T read() noexcept(false);
@@ -47,10 +47,10 @@ private:
};
template<string_input_iterator It, serializable T>
-constexpr void operator<<(T& x, binary_reader<It>& reader) noexcept(false);
+constexpr CORRADE_ALWAYS_INLINE void operator<<(T& x, binary_reader<It>& reader) noexcept(false);
template<string_input_iterator It, serializable T>
-constexpr void operator>>(binary_reader<It>& reader, T& x) noexcept(false);
+constexpr CORRADE_ALWAYS_INLINE void operator>>(binary_reader<It>& reader, T& x) noexcept(false);
template<string_input_iterator It> binary_reader(It&& begin, It&& end) -> binary_reader<std::decay_t<It>>;
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<typename T>
-constexpr inline T maybe_byteswap(T x) noexcept
+constexpr CORRADE_ALWAYS_INLINE T maybe_byteswap(T x) noexcept
{
return x;
}
template<integer T>
-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<std::output_iterator<char> It, serializable T>
-constexpr binary_writer<It>& operator<<(binary_writer<It>& writer, T x) noexcept;
+constexpr CORRADE_ALWAYS_INLINE binary_writer<It>& operator<<(binary_writer<It>& writer, T x) noexcept;
} // namespace floormat::Serialize