mirror of
https://github.com/taglib/taglib.git
synced 2025-06-04 01:28:21 -04:00
Prefer isEmpty()/empty() to size() == 0.
This commit is contained in:
parent
a358e87cc4
commit
5fc5a2e81a
@ -351,7 +351,7 @@ long MPEG::File::nextFrameOffset(long position)
|
||||
while(true) {
|
||||
seek(position);
|
||||
const ByteVector buffer = readBlock(bufferSize());
|
||||
if(buffer.size() == 0)
|
||||
if(buffer.isEmpty())
|
||||
return -1;
|
||||
|
||||
for(unsigned int i = 0; i < buffer.size(); ++i) {
|
||||
@ -378,7 +378,7 @@ long MPEG::File::previousFrameOffset(long position)
|
||||
|
||||
seek(position);
|
||||
const ByteVector buffer = readBlock(bufferSize());
|
||||
if(buffer.size() == 0)
|
||||
if(buffer.isEmpty())
|
||||
return -1;
|
||||
|
||||
for(int i = buffer.size() - 1; i >= 0; i--) {
|
||||
|
@ -187,7 +187,7 @@ void RIFF::File::setChunkData(const ByteVector &name, const ByteVector &data)
|
||||
|
||||
void RIFF::File::setChunkData(const ByteVector &name, const ByteVector &data, bool alwaysCreate)
|
||||
{
|
||||
if(d->chunks.size() == 0) {
|
||||
if(d->chunks.empty()) {
|
||||
debug("RIFF::File::setChunkData - No valid chunks found.");
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user