From a5de88ab3991532874aff548fcf117b32b0138e8 Mon Sep 17 00:00:00 2001 From: qndel Date: Mon, 16 Sep 2019 01:08:30 +0200 Subject: [PATCH] SortWitch cleanup --- Source/items.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Source/items.cpp b/Source/items.cpp index db4c667bd..35ea5711f 100644 --- a/Source/items.cpp +++ b/Source/items.cpp @@ -3560,12 +3560,10 @@ void SortWitch() sorted = FALSE; while (j > 3 && !sorted) { sorted = TRUE; - if (j > 3) { - for (k = 3; k < j; k++) { - if (witchitem[k].IDidx > witchitem[k + 1].IDidx) { - BubbleSwapItem(&witchitem[k], &witchitem[k + 1]); - sorted = FALSE; - } + for (k = 3; k < j; k++) { + if (witchitem[k].IDidx > witchitem[k + 1].IDidx) { + BubbleSwapItem(&witchitem[k], &witchitem[k + 1]); + sorted = FALSE; } } j--;