From 51a0d540e504a4a5d458b51e5fe63c0484a6f823 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Fri, 8 Aug 2014 08:28:24 +0200 Subject: [PATCH] Even more optimization of this list iteration. I hope everyone is happy, now. --- src/kits/tracker/PoseViewScripting.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kits/tracker/PoseViewScripting.cpp b/src/kits/tracker/PoseViewScripting.cpp index 41781bb630..e6619fad95 100644 --- a/src/kits/tracker/PoseViewScripting.cpp +++ b/src/kits/tracker/PoseViewScripting.cpp @@ -466,7 +466,7 @@ BPoseView::DeleteProperty(BMessage* specifier, int32 form, } else Delete(entryList, false, settings.AskBeforeDeleteFile()); } else { - for (int i = 0; i < entryList->CountItems(); i++) + for (int i = entryList->CountItems() - 1; i >= 0; i--) delete entryList->ItemAt(i); delete entryList; }