mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
size() to isEmpty() (#1131)
Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
912897cd35
commit
528b84fbde
@ -315,7 +315,7 @@ void IT::File::read(bool)
|
||||
comment.append(sampleName);
|
||||
}
|
||||
|
||||
if(message.size() > 0)
|
||||
if(!message.isEmpty())
|
||||
comment.append(message);
|
||||
d->tag.setComment(comment.toString("\n"));
|
||||
d->tag.setTrackerName("Impulse Tracker");
|
||||
|
@ -74,7 +74,7 @@ ByteVector SynchData::fromUInt(unsigned int value)
|
||||
|
||||
ByteVector SynchData::decode(const ByteVector &data)
|
||||
{
|
||||
if (data.size() == 0) {
|
||||
if(data.isEmpty()) {
|
||||
return ByteVector();
|
||||
}
|
||||
|
||||
|
@ -376,12 +376,12 @@ ByteVector &ByteVector::setData(const char *data)
|
||||
char *ByteVector::data()
|
||||
{
|
||||
detach();
|
||||
return (size() > 0) ? (&(*d->data)[d->offset]) : nullptr;
|
||||
return !isEmpty() ? (&(*d->data)[d->offset]) : nullptr;
|
||||
}
|
||||
|
||||
const char *ByteVector::data() const
|
||||
{
|
||||
return (size() > 0) ? (&(*d->data)[d->offset]) : nullptr;
|
||||
return !isEmpty() ? (&(*d->data)[d->offset]) : nullptr;
|
||||
}
|
||||
|
||||
ByteVector ByteVector::mid(unsigned int index, unsigned int length) const
|
||||
|
@ -159,7 +159,7 @@ public:
|
||||
unsigned int read(TagLib::File &file, unsigned int limit) override
|
||||
{
|
||||
ByteVector data = file.readBlock(std::min(1U,limit));
|
||||
if(data.size() > 0) {
|
||||
if(!data.isEmpty()) {
|
||||
value = data[0];
|
||||
}
|
||||
return data.size();
|
||||
|
Loading…
Reference in New Issue
Block a user