diff --git a/Source/Core/VideoCommon/DataReader.h b/Source/Core/VideoCommon/DataReader.h index 7ab572734a..55bd678cb1 100644 --- a/Source/Core/VideoCommon/DataReader.h +++ b/Source/Core/VideoCommon/DataReader.h @@ -30,7 +30,7 @@ public: T data; std::memcpy(&data, &buffer[offset], sizeof(T)); - if (swapped) + if constexpr (swapped) data = Common::FromBigEndian(data); return data; @@ -47,7 +47,7 @@ public: template DOLPHIN_FORCE_INLINE void Write(T data) { - if (swapped) + if constexpr (swapped) data = Common::FromBigEndian(data); std::memcpy(buffer, &data, sizeof(T));