Various uint fixes

We really need to get rid of TagLib::uint...
This commit is contained in:
Lukáš Lalinský
2012-09-30 10:22:10 +02:00
parent 57e5cc8c17
commit 60a3a4e455
2 changed files with 4 additions and 5 deletions

View File

@ -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<long>(0, length() - offset), (offset & 1) ? 1 : 0);
// And update our internal structure

View File

@ -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);
}