mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-17 20:09:50 +01:00
Patch a weird big endian swap thing in taglib
This commit is contained in:
parent
4411b25e86
commit
1430cc4114
22
3rdparty/taglib/patches/02-swap-big-endian.patch
vendored
Normal file
22
3rdparty/taglib/patches/02-swap-big-endian.patch
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
diff --git a/3rdparty/taglib/toolkit/tbytevector.cpp b/3rdparty/taglib/toolkit/tbytevector.cpp
|
||||
index ddc3d4f..f36758f 100644
|
||||
--- a/3rdparty/taglib/toolkit/tbytevector.cpp
|
||||
+++ b/3rdparty/taglib/toolkit/tbytevector.cpp
|
||||
@@ -218,7 +218,7 @@ T toNumber(const ByteVector &v, size_t offset, bool mostSignificantByteFirst)
|
||||
#if SYSTEM_BYTEORDER == 1
|
||||
const bool swap = mostSignificantByteFirst;
|
||||
#else
|
||||
- const bool swap != mostSignificantByteFirst;
|
||||
+ const bool swap = !mostSignificantByteFirst;
|
||||
#endif
|
||||
if(swap)
|
||||
return byteSwap(tmp);
|
||||
@@ -234,7 +234,7 @@ ByteVector fromNumber(T value, bool mostSignificantByteFirst)
|
||||
#if SYSTEM_BYTEORDER == 1
|
||||
const bool swap = mostSignificantByteFirst;
|
||||
#else
|
||||
- const bool swap != mostSignificantByteFirst;
|
||||
+ const bool swap = !mostSignificantByteFirst;
|
||||
#endif
|
||||
if(swap)
|
||||
value = byteSwap(value);
|
4
3rdparty/taglib/toolkit/tbytevector.cpp
vendored
4
3rdparty/taglib/toolkit/tbytevector.cpp
vendored
@ -218,7 +218,7 @@ T toNumber(const ByteVector &v, size_t offset, bool mostSignificantByteFirst)
|
||||
#if SYSTEM_BYTEORDER == 1
|
||||
const bool swap = mostSignificantByteFirst;
|
||||
#else
|
||||
const bool swap != mostSignificantByteFirst;
|
||||
const bool swap = !mostSignificantByteFirst;
|
||||
#endif
|
||||
if(swap)
|
||||
return byteSwap(tmp);
|
||||
@ -234,7 +234,7 @@ ByteVector fromNumber(T value, bool mostSignificantByteFirst)
|
||||
#if SYSTEM_BYTEORDER == 1
|
||||
const bool swap = mostSignificantByteFirst;
|
||||
#else
|
||||
const bool swap != mostSignificantByteFirst;
|
||||
const bool swap = !mostSignificantByteFirst;
|
||||
#endif
|
||||
if(swap)
|
||||
value = byteSwap(value);
|
||||
|
Loading…
Reference in New Issue
Block a user