Browse Source

Merge pull request #1652 from qndel/SortWitch

SortWitch cleanup
pull/256/head
Robin Eklind 7 years ago committed by GitHub
parent
commit
4b170cab01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      Source/items.cpp

10
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--;

Loading…
Cancel
Save