Avoid using String::null where an empty string is required.

String::null is not necessarily be empty or remains the same instance.
Using it in a public header may lead to a linkage error.
This commit is contained in:
Tsuda Kageyu
2015-11-20 22:21:47 +09:00
parent c4fe65787c
commit 8c6fe45453
29 changed files with 106 additions and 105 deletions

View File

@ -99,7 +99,7 @@ bool Mod::File::save()
}
for(uint i = n; i < d->properties.instrumentCount(); ++ i) {
writeString(String::null, 22);
writeString(String(), 22);
seek(8, Current);
}
return true;

View File

@ -55,12 +55,12 @@ String Mod::Tag::title() const
String Mod::Tag::artist() const
{
return String::null;
return String();
}
String Mod::Tag::album() const
{
return String::null;
return String();
}
String Mod::Tag::comment() const
@ -70,7 +70,7 @@ String Mod::Tag::comment() const
String Mod::Tag::genre() const
{
return String::null;
return String();
}
TagLib::uint Mod::Tag::year() const
@ -142,19 +142,19 @@ PropertyMap Mod::Tag::setProperties(const PropertyMap &origProps)
d->title = properties["TITLE"].front();
oneValueSet.append("TITLE");
} else
d->title = String::null;
d->title.clear();
if(properties.contains("COMMENT")) {
d->comment = properties["COMMENT"].front();
oneValueSet.append("COMMENT");
} else
d->comment = String::null;
d->comment.clear();
if(properties.contains("TRACKERNAME")) {
d->trackerName = properties["TRACKERNAME"].front();
oneValueSet.append("TRACKERNAME");
} else
d->trackerName = String::null;
d->trackerName.clear();
// for each tag that has been set above, remove the first entry in the corresponding
// value list. The others will be returned as unsupported by this format.