Skip to content

Commit

Permalink
Merge pull request #1652 from qndel/SortWitch
Browse files Browse the repository at this point in the history
SortWitch cleanup
  • Loading branch information
mewmew authored Sep 15, 2019
2 parents a050715 + a5de88a commit 4b170ca
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Source/items.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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--;
Expand Down

0 comments on commit 4b170ca

Please sign in to comment.