diff options
Diffstat (limited to 'app/source/Cplt/Utils/IO/Helper.hpp')
-rw-r--r-- | app/source/Cplt/Utils/IO/Helper.hpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/source/Cplt/Utils/IO/Helper.hpp b/app/source/Cplt/Utils/IO/Helper.hpp index 7a84103..b8f4e6f 100644 --- a/app/source/Cplt/Utils/IO/Helper.hpp +++ b/app/source/Cplt/Utils/IO/Helper.hpp @@ -7,8 +7,7 @@ namespace DataStreamAdapters { /// Helper to invoke either Read() or ReadObject(). /// This is intended for writing IO adapters, users that's writing IO logic shouldn't using this - it increases compile time while reducing readability. template <class TAdapter, class T> -void ReadHelper(InputDataStream& stream, T& t) -{ +void ReadHelper(InputDataStream& stream, T& t) { if constexpr (!std::is_same_v<TAdapter, void>) { stream.ReadObjectAdapted<TAdapter>(t); } else if constexpr (requires(T tt, InputDataStream ss) { ss.Read(tt); }) { @@ -25,8 +24,7 @@ void ReadHelper(InputDataStream& stream, T& t) /// Helper to invoke either Write() or WriteObject(). /// This is intended for writing IO adapters, users that's writing IO logic shouldn't using this - it increases compile time while reducing readability. template <class TAdapter, class T> -void WriteHelper(OutputDataStream& stream, T& t) -{ +void WriteHelper(OutputDataStream& stream, T& t) { if constexpr (!std::is_same_v<TAdapter, void>) { stream.WriteObjectAdapted<TAdapter>(t); } else if constexpr (requires(T tt, OutputDataStream ss) { ss.Write(tt); }) { |