From b051df00623ec9fa3be09032652728743f78f098 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Luk=C3=A1=C5=A1=20Lalinsk=C3=BD?= Date: Sat, 22 Jan 2011 21:07:16 +0000 Subject: [PATCH] Fix compilation on MSVC 2010 with the C++0x version of std::bitset Hopefuly it doesn't break anything on older compilers... git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1216365 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- taglib/ape/apefooter.cpp | 2 +- taglib/mpc/mpcproperties.cpp | 2 +- taglib/mpeg/mpegheader.cpp | 2 +- taglib/wavpack/wavpackproperties.cpp | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/taglib/ape/apefooter.cpp b/taglib/ape/apefooter.cpp index 8d778d91..3cae0b2f 100644 --- a/taglib/ape/apefooter.cpp +++ b/taglib/ape/apefooter.cpp @@ -189,7 +189,7 @@ void Footer::parse(const ByteVector &data) // Read the flags - std::bitset<32> flags(data.mid(20, 4).toUInt(false)); + std::bitset<32> flags(static_cast(data.mid(20, 4).toUInt(false))); d->headerPresent = flags[31]; d->footerPresent = !flags[30]; diff --git a/taglib/mpc/mpcproperties.cpp b/taglib/mpc/mpcproperties.cpp index 9024f5bd..8ac81b6e 100644 --- a/taglib/mpc/mpcproperties.cpp +++ b/taglib/mpc/mpcproperties.cpp @@ -113,7 +113,7 @@ void MPC::Properties::read() if(d->version >= 7) { frames = d->data.mid(4, 4).toUInt(false); - std::bitset<32> flags = d->data.mid(8, 4).toUInt(false); + std::bitset<32> flags(static_cast(d->data.mid(8, 4).toUInt(false))); d->sampleRate = sftable[flags[17] * 2 + flags[16]]; d->channels = 2; } diff --git a/taglib/mpeg/mpegheader.cpp b/taglib/mpeg/mpegheader.cpp index aafdd18f..bdc15554 100644 --- a/taglib/mpeg/mpegheader.cpp +++ b/taglib/mpeg/mpegheader.cpp @@ -168,7 +168,7 @@ void MPEG::Header::parse(const ByteVector &data) return; } - std::bitset<32> flags(data.toUInt()); + std::bitset<32> flags(static_cast(data.toUInt())); // Check for the second byte's part of the MPEG synch diff --git a/taglib/wavpack/wavpackproperties.cpp b/taglib/wavpack/wavpackproperties.cpp index 0f65aedb..52552a0d 100644 --- a/taglib/wavpack/wavpackproperties.cpp +++ b/taglib/wavpack/wavpackproperties.cpp @@ -29,7 +29,6 @@ #include #include -#include #include "wavpackproperties.h" #include "wavpackfile.h" -- 2.40.0