summaryrefslogtreecommitdiffhomepage
path: root/serialize/binary-reader.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'serialize/binary-reader.hpp')
-rw-r--r--serialize/binary-reader.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/serialize/binary-reader.hpp b/serialize/binary-reader.hpp
index 3b6eae9a..7eed2145 100644
--- a/serialize/binary-reader.hpp
+++ b/serialize/binary-reader.hpp
@@ -1,11 +1,12 @@
#pragma once
#include "binary-serializer.hpp"
#include <iterator>
+#include <Corrade/Containers/StringView.h>
namespace floormat::Serialize {
-union value_u {
- alignas(alignof(double)) char bytes[8];
+union alignas(alignof(double)) value_u {
+ char bytes[8];
unsigned char uc;
std::uint8_t u8;
std::uint16_t u16;
@@ -44,6 +45,7 @@ struct binary_reader final {
template<typename T> T read() noexcept;
template<std::size_t N> constexpr std::array<char, N> read() noexcept;
constexpr std::size_t bytes_read() const noexcept { return num_bytes_read; }
+ constexpr StringView read_asciiz_string() noexcept;
private:
std::size_t num_bytes_read = 0;