Browse Source

Merge pull request #1654 from qndel/SortSmith

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

10
Source/items.cpp

@ -3379,12 +3379,10 @@ void SortSmith()
sorted = FALSE; sorted = FALSE;
while (j > 0 && !sorted) { while (j > 0 && !sorted) {
sorted = TRUE; sorted = TRUE;
if (j > 0) { for (k = 0; k < j; k++) {
for (k = 0; k < j; k++) { if (smithitem[k].IDidx > smithitem[k + 1].IDidx) {
if (smithitem[k].IDidx > smithitem[k + 1].IDidx) { BubbleSwapItem(&smithitem[k], &smithitem[k + 1]);
BubbleSwapItem(&smithitem[k], &smithitem[k + 1]); sorted = FALSE;
sorted = FALSE;
}
} }
} }
j--; j--;

Loading…
Cancel
Save