Fix LLP64 detection in SwapByteOrder.h
MSVC does not define __LONG_MAX__, so we were just getting lucky in this conditional: #if __LONG_MAX__ == __INT_MAX__ Undefined identifiers evaluate to zero in preprocessor conditionals, so this became true, which happens to work for MSVC platforms. Instead, use this pattern and let the compiler constant fold: return sizeof(long) == sizeof(int) ? SwapByteOrder_32((uint32_t)C) : SwapByteOrder_64((uint64_t)C);
Loading
Please sign in to comment