Use constexpr if (#1103)

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2023-08-05 07:56:23 -07:00 committed by GitHub
parent ee8124ed7a
commit bd6c3ba174
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -208,7 +208,7 @@ long double toFloat80(const ByteVector &v, size_t offset)
unsigned char bytes[10];
::memcpy(bytes, v.data() + offset, 10);
if(ENDIAN == Utils::LittleEndian) {
if constexpr(ENDIAN == Utils::LittleEndian) {
swap(bytes[0], bytes[9]);
swap(bytes[1], bytes[8]);
swap(bytes[2], bytes[7]);