add const
This commit is contained in:
@@ -16,7 +16,7 @@ void SwapBytes(T& value) {
|
||||
std::reverse(ptr, ptr + sizeof(T));
|
||||
}
|
||||
|
||||
bool IsSystemBigEndian() {
|
||||
static bool IsSystemBigEndian() {
|
||||
static constexpr std::uint16_t test = 10;
|
||||
static const bool isBigEndian = reinterpret_cast<const std::uint8_t*>(&test)[1] == 10;
|
||||
return isBigEndian;
|
||||
|
||||
Reference in New Issue
Block a user