diff options
author | Shauren <shauren.trinity@gmail.com> | 2023-01-05 12:16:21 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2023-01-05 12:16:21 +0100 |
commit | 585900f42d064b9f6adc08015605931163ea79c8 (patch) | |
tree | 9b723c551bf1f33ed17f189a8f2d4496a0197777 /src/common/Utilities/ByteConverter.h | |
parent | d658641764b6d7f058d515aed8a333e3ca0a6e56 (diff) |
Core/Misc: Added a include hack for msvc <chrono> to use only c++17 bits from it
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); } |