Use List::isEmpty() rather than size() to check if the list is empty.

std::list::empty() is guaranteed to be an O(1) operation.
This commit is contained in:
Tsuda Kageyu
2015-11-18 16:57:41 +09:00
parent 288e97ad44
commit 6e6e11f21a
5 changed files with 15 additions and 15 deletions

View File

@ -635,7 +635,7 @@ void XM::File::read(bool)
d->properties.setSampleCount(sumSampleCount);
String comment(intrumentNames.toString("\n"));
if(sampleNames.size() > 0) {
if(!sampleNames.isEmpty()) {
comment += "\n";
comment += sampleNames.toString("\n");
}