diff --git a/include/sp/common/ByteSwapping.h b/include/sp/common/ByteSwapping.h index 55d2fdc..5eb2e5a 100644 --- a/include/sp/common/ByteSwapping.h +++ b/include/sp/common/ByteSwapping.h @@ -17,9 +17,9 @@ void SwapBytes(T& value) { } bool IsSystemBigEndian() { - std::uint16_t test = 0; - reinterpret_cast(&test)[1] = 1; - return test == 1; + static constexpr std::uint16_t test = 10; + static const bool isBigEndian = reinterpret_cast(&test)[1] == 10; + return isBigEndian; } /**