mirror of
				https://github.com/taglib/taglib.git
				synced 2025-10-31 15:55:17 -04:00 
			
		
		
		
	Prefer isEmpty()/empty() to size() == 0.
This commit is contained in:
		| @ -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; | ||||
|   } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user