From: Lukáš Lalinský Date: Sun, 30 Sep 2012 08:22:10 +0000 (+0200) Subject: Various uint fixes X-Git-Tag: v1.9~84^2~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=60a3a4e455ba4f71f50bf691b89b8410a1d56826;p=taglib Various uint fixes We really need to get rid of TagLib::uint... --- diff --git a/taglib/riff/rifffile.cpp b/taglib/riff/rifffile.cpp index 22fd3184..a38e1c40 100644 --- a/taglib/riff/rifffile.cpp +++ b/taglib/riff/rifffile.cpp @@ -191,7 +191,6 @@ void RIFF::File::setChunkData(const ByteVector &name, const ByteVector &data, bo // Now add the chunk to the file - long len = length(); writeChunk(name, data, offset, std::max(0, length() - offset), (offset & 1) ? 1 : 0); // And update our internal structure diff --git a/taglib/riff/wav/wavfile.cpp b/taglib/riff/wav/wavfile.cpp index 489adc3b..0ba40665 100644 --- a/taglib/riff/wav/wavfile.cpp +++ b/taglib/riff/wav/wavfile.cpp @@ -199,13 +199,13 @@ void RIFF::WAV::File::strip(TagTypes tags) removeChunk(d->tagChunkID); if(tags & Info){ - uint chunkId = findInfoTagChunk(); - if(chunkId != -1) + TagLib::uint chunkId = findInfoTagChunk(); + if(chunkId != TagLib::uint(-1)) removeChunk(chunkId); } } -uint RIFF::WAV::File::findInfoTagChunk() +TagLib::uint RIFF::WAV::File::findInfoTagChunk() { for(uint i = 0; i < chunkCount(); ++i) { if(chunkName(i) == "LIST" && chunkData(i).mid(0, 4) == "INFO") { @@ -213,5 +213,5 @@ uint RIFF::WAV::File::findInfoTagChunk() } } - return -1; + return TagLib::uint(-1); }