diff options
author | Shauren <shauren.trinity@gmail.com> | 2023-01-05 12:16:21 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2023-08-12 14:27:25 +0200 |
commit | 73e7f0fe6d5ea2c75ad452effe9d7b95dd323ea2 (patch) | |
tree | 9ecf97ab29113b05a21a4953c8e4952076efbfd9 /src/common/Utilities/ByteConverter.h | |
parent | d0553d499b17b5e20640cea5187934ff0bcbc528 (diff) |
Core/Misc: Added a include hack for msvc <chrono> to use only c++17 bits from it
(cherry picked from commit 585900f42d064b9f6adc08015605931163ea79c8)
Diffstat (limited to 'src/common/Utilities/ByteConverter.h')
-rw-r--r-- | src/common/Utilities/ByteConverter.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/common/Utilities/ByteConverter.h b/src/common/Utilities/ByteConverter.h index 59be4adb86b..d9b74b83264 100644 --- a/src/common/Utilities/ByteConverter.h +++ b/src/common/Utilities/ByteConverter.h @@ -23,14 +23,15 @@ */ #include "Define.h" -#include <algorithm> namespace ByteConverter { template<size_t T> inline void convert(char *val) { - std::swap(*val, *(val + T - 1)); + char tmp = *val; + *val = *(val + T - 1); + *(val + T - 1) = tmp; convert<T - 2>(val + 1); } |