diff --git a/taglib/toolkit/tbytevector.cpp b/taglib/toolkit/tbytevector.cpp index 3338f61e..6e75c8c0 100644 --- a/taglib/toolkit/tbytevector.cpp +++ b/taglib/toolkit/tbytevector.cpp @@ -186,11 +186,11 @@ TFloat toFloat(const ByteVector &v, size_t offset) ::memcpy(&tmp, v.data() + offset, sizeof(TInt)); if(ENDIAN != Utils::systemByteOrder()) { - if constexpr (sizeof(T) == 2) + if constexpr (sizeof(TInt) == 2) tmp.i = Utils::byteSwap(static_cast(tmp.i)); - else if constexpr (sizeof(T) == 4) + else if constexpr (sizeof(TInt) == 4) tmp.i = Utils::byteSwap(static_cast(tmp.i)); - else if constexpr (sizeof(T) == 8) + else if constexpr (sizeof(TInt) == 8) tmp.i = Utils::byteSwap(static_cast(tmp.i)); else static_assert(false, "Byte swap requested for type with invalid size"); @@ -209,11 +209,11 @@ ByteVector fromFloat(TFloat value) tmp.f = value; if(ENDIAN != Utils::systemByteOrder()) { - if constexpr (sizeof(T) == 2) + if constexpr (sizeof(TInt) == 2) tmp.i = Utils::byteSwap(static_cast(tmp.i)); - else if constexpr (sizeof(T) == 4) + else if constexpr (sizeof(TInt) == 4) tmp.i = Utils::byteSwap(static_cast(tmp.i)); - else if constexpr (sizeof(T) == 8) + else if constexpr (sizeof(TInt) == 8) tmp.i = Utils::byteSwap(static_cast(tmp.i)); else static_assert(false, "Byte swap requested for type with invalid size");