util/{Const,Writable}Buffer, ...: rename IsEmpty() to empty(), imitating STL
This commit is contained in:
@@ -191,7 +191,7 @@ TagBuilder::Complement(const Tag &other)
|
||||
inline void
|
||||
TagBuilder::AddItemInternal(TagType type, StringView value)
|
||||
{
|
||||
assert(!value.IsEmpty());
|
||||
assert(!value.empty());
|
||||
|
||||
auto f = FixTagString(value);
|
||||
if (!f.IsNull())
|
||||
@@ -209,7 +209,7 @@ TagBuilder::AddItemInternal(TagType type, StringView value)
|
||||
void
|
||||
TagBuilder::AddItem(TagType type, StringView value)
|
||||
{
|
||||
if (value.IsEmpty() || !IsTagEnabled(type))
|
||||
if (value.empty() || !IsTagEnabled(type))
|
||||
return;
|
||||
|
||||
AddItemInternal(type, value);
|
||||
|
@@ -74,7 +74,7 @@ public:
|
||||
* Returns true if the tag contains no items. This ignores
|
||||
* the "duration" attribute.
|
||||
*/
|
||||
bool IsEmpty() const {
|
||||
bool empty() const {
|
||||
return items.empty();
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ public:
|
||||
*/
|
||||
gcc_pure
|
||||
bool IsDefined() const noexcept {
|
||||
return !duration.IsNegative() || has_playlist || !IsEmpty();
|
||||
return !duration.IsNegative() || has_playlist || !empty();
|
||||
}
|
||||
|
||||
void Clear();
|
||||
|
@@ -334,7 +334,7 @@ tag_id3_import(struct id3_tag *tag)
|
||||
{
|
||||
TagBuilder tag_builder;
|
||||
scan_id3_tag(tag, add_tag_handler, &tag_builder);
|
||||
return tag_builder.IsEmpty()
|
||||
return tag_builder.empty()
|
||||
? nullptr
|
||||
: tag_builder.CommitNew();
|
||||
}
|
||||
|
Reference in New Issue
Block a user