mirror of
https://github.com/taglib/taglib.git
synced 2026-03-21 22:29:56 -04:00
Avoid using String::isNull() where it is considered to be confused with isEmpty().
This commit is contained in:
@ -116,8 +116,6 @@ PropertyMap CommentsFrame::asProperties() const
|
||||
PropertyMap map;
|
||||
if(key.isEmpty() || key == "COMMENT")
|
||||
map.insert("COMMENT", text());
|
||||
else if(key.isNull())
|
||||
map.unsupportedData().append(L"COMM/" + description());
|
||||
else
|
||||
map.insert("COMMENT:" + key, text());
|
||||
return map;
|
||||
@ -164,7 +162,7 @@ void CommentsFrame::parseFields(const ByteVector &data)
|
||||
} else {
|
||||
d->description = String(l.front(), d->textEncoding);
|
||||
d->text = String(l.back(), d->textEncoding);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -159,7 +159,7 @@ void SynchronizedLyricsFrame::parseFields(const ByteVector &data)
|
||||
int pos = 6;
|
||||
|
||||
d->description = readStringField(data, d->textEncoding, &pos);
|
||||
if(d->description.isNull())
|
||||
if(d->description.isEmpty())
|
||||
return;
|
||||
|
||||
/*
|
||||
@ -190,7 +190,7 @@ void SynchronizedLyricsFrame::parseFields(const ByteVector &data)
|
||||
}
|
||||
}
|
||||
String text = readStringField(data, enc, &pos);
|
||||
if(text.isNull() || pos + 4 > end)
|
||||
if(text.isEmpty() || pos + 4 > end)
|
||||
return;
|
||||
|
||||
uint time = data.toUInt(pos, true);
|
||||
|
||||
@ -292,7 +292,7 @@ PropertyMap TextIdentificationFrame::makeTMCLProperties() const
|
||||
StringList l = fieldList();
|
||||
for(StringList::ConstIterator it = l.begin(); it != l.end(); ++it) {
|
||||
String instrument = it->upper();
|
||||
if(instrument.isNull()) {
|
||||
if(instrument.isEmpty()) {
|
||||
// instrument is not a valid key -> frame unsupported
|
||||
map.clear();
|
||||
map.unsupportedData().append(frameID());
|
||||
|
||||
@ -119,8 +119,6 @@ PropertyMap UnsynchronizedLyricsFrame::asProperties() const
|
||||
String key = description().upper();
|
||||
if(key.isEmpty() || key.upper() == "LYRICS")
|
||||
map.insert("LYRICS", text());
|
||||
else if(key.isNull())
|
||||
map.unsupportedData().append(L"USLT/" + description());
|
||||
else
|
||||
map.insert("LYRICS:" + key, text());
|
||||
return map;
|
||||
@ -164,7 +162,7 @@ void UnsynchronizedLyricsFrame::parseFields(const ByteVector &data)
|
||||
} else {
|
||||
d->description = String(l.front(), d->textEncoding);
|
||||
d->text = String(l.back(), d->textEncoding);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -159,8 +159,6 @@ PropertyMap UserUrlLinkFrame::asProperties() const
|
||||
String key = description().upper();
|
||||
if(key.isEmpty() || key.upper() == "URL")
|
||||
map.insert("URL", url());
|
||||
else if(key.isNull())
|
||||
map.unsupportedData().append(L"WXXX/" + description());
|
||||
else
|
||||
map.insert("URL:" + key, url());
|
||||
return map;
|
||||
|
||||
Reference in New Issue
Block a user