diff options
Diffstat (limited to 'core/src/Utils/IO/StringIntegration.hpp')
-rw-r--r-- | core/src/Utils/IO/StringIntegration.hpp | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/core/src/Utils/IO/StringIntegration.hpp b/core/src/Utils/IO/StringIntegration.hpp deleted file mode 100644 index 536cb83..0000000 --- a/core/src/Utils/IO/StringIntegration.hpp +++ /dev/null @@ -1,37 +0,0 @@ -#pragma once - -#include "Utils/IO/DataStream.hpp" - -#include <iterator> -#include <string> -#include <string_view> - -namespace DataStreamAdapters { -struct String -{ - static void ReadFromDataStream(InputDataStream& stream, std::string& str) - { - uint64_t size; - stream.Read(size); - - str = {}; - str.reserve(size); - stream.ReadBytes(size, std::back_inserter(str)); - } - - static void WriteToDataStream(OutputDataStream& stream, const std::string& str) - { - stream.Write((uint64_t)str.size()); - stream.WriteBytes(str.size(), str.data()); - } -}; - -struct StringView -{ - static void WriteToDataStream(OutputDataStream& stream, const std::string_view& str) - { - stream.Write((uint64_t)str.size()); - stream.WriteBytes(str.size(), str.data()); - } -}; -} // namespace DataStreamAdapters |