micro-optimize FOO-=$$BAR for empty FOO
there is no point in iterating BAR if FOO is (or became) empty. Change-Id: I86c89bf0ad726a5ab7ead990a27ef7cc32caebbf Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>bb10
parent
d88ff29c57
commit
33c33f6475
|
|
@ -396,9 +396,12 @@ void ProStringList::removeAll(const char *str)
|
|||
|
||||
void ProStringList::removeEach(const ProStringList &value)
|
||||
{
|
||||
for (const ProString &str : value)
|
||||
for (const ProString &str : value) {
|
||||
if (isEmpty())
|
||||
break;
|
||||
if (!str.isEmpty())
|
||||
removeAll(str);
|
||||
}
|
||||
}
|
||||
|
||||
void ProStringList::removeEmpty()
|
||||
|
|
|
|||
Loading…
Reference in New Issue