add const

This commit is contained in:
2025-02-23 13:20:45 +01:00
parent f145716cf6
commit 468f5ce8a0
3 changed files with 14 additions and 14 deletions

View File

@@ -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;