From 60a3a4e455ba4f71f50bf691b89b8410a1d56826 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Luk=C3=A1=C5=A1=20Lalinsk=C3=BD?= Date: Sun, 30 Sep 2012 10:22:10 +0200 Subject: [PATCH] Various uint fixes We really need to get rid of TagLib::uint... --- taglib/riff/rifffile.cpp | 1 - taglib/riff/wav/wavfile.cpp | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) 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); } -- 2.40.0