More efficient clearing of the entryList.
As pointed out by Ingo, using RemoveAt(0) here is needlessly inneficient.
This commit is contained in:
@@ -466,9 +466,8 @@ BPoseView::DeleteProperty(BMessage* specifier, int32 form,
|
|||||||
} else
|
} else
|
||||||
Delete(entryList, false, settings.AskBeforeDeleteFile());
|
Delete(entryList, false, settings.AskBeforeDeleteFile());
|
||||||
} else {
|
} else {
|
||||||
entry_ref* ref;
|
for (int i = 0; i < entryList->CountItems(); i++)
|
||||||
while ((ref = entryList->RemoveItemAt(0)) != NULL)
|
delete entryList->ItemAt(i);
|
||||||
delete ref;
|
|
||||||
delete entryList;
|
delete entryList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user