More efficient clearing of the entryList.

As pointed out by Ingo, using RemoveAt(0) here is needlessly
inneficient.
This commit is contained in:
Adrien Destugues
2014-08-07 13:50:25 +02:00
parent 1ec28f7117
commit 267d1d780c
+2 -3
View File
@@ -466,9 +466,8 @@ BPoseView::DeleteProperty(BMessage* specifier, int32 form,
} else
Delete(entryList, false, settings.AskBeforeDeleteFile());
} else {
entry_ref* ref;
while ((ref = entryList->RemoveItemAt(0)) != NULL)
delete ref;
for (int i = 0; i < entryList->CountItems(); i++)
delete entryList->ItemAt(i);
delete entryList;
}