diff options
| author | untodesu <kirill@untode.su> | 2025-12-26 14:50:33 +0500 |
|---|---|---|
| committer | untodesu <kirill@untode.su> | 2025-12-26 14:50:33 +0500 |
| commit | 6c2abde5c99a236453b795abaa6d7d70105e31f7 (patch) | |
| tree | f085049b9615a7d03cca5de40adb6529d6c13e11 /src/core/io/buffer.hh | |
| parent | f40d09cb8f712e87691af4912f3630d92d692779 (diff) | |
| download | voxelius-6c2abde5c99a236453b795abaa6d7d70105e31f7.tar.bz2 voxelius-6c2abde5c99a236453b795abaa6d7d70105e31f7.zip | |
Just a big Ctrl+H refactoring
Diffstat (limited to 'src/core/io/buffer.hh')
| -rw-r--r-- | src/core/io/buffer.hh | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/core/io/buffer.hh b/src/core/io/buffer.hh index 96a37b1..450a86f 100644 --- a/src/core/io/buffer.hh +++ b/src/core/io/buffer.hh @@ -1,5 +1,3 @@ -namespace io -{ class ReadBuffer final { public: ReadBuffer(void) = default; @@ -31,10 +29,7 @@ private: std::vector<std::byte> m_vector; std::size_t m_position; }; -} // namespace io -namespace io -{ class WriteBuffer final { public: WriteBuffer(void) = default; @@ -61,27 +56,26 @@ public: private: std::vector<std::byte> m_vector; }; -} // namespace io -constexpr void io::ReadBuffer::rewind(void) +constexpr void ReadBuffer::rewind(void) { m_position = 0; } -constexpr bool io::ReadBuffer::is_ended(void) const +constexpr bool ReadBuffer::is_ended(void) const { return m_position >= m_vector.size(); } template<typename T> -io::ReadBuffer& io::ReadBuffer::operator>>(T& value) +ReadBuffer& ReadBuffer::operator>>(T& value) { value = read<T>(); return *this; } template<typename T> -io::WriteBuffer& io::WriteBuffer::operator<<(const T value) +WriteBuffer& WriteBuffer::operator<<(const T value) { write<T>(value); return *this; |
