diff options
Diffstat (limited to 'apps/plugins/puzzles/src/twiddle.c')
-rw-r--r-- | apps/plugins/puzzles/src/twiddle.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/apps/plugins/puzzles/src/twiddle.c b/apps/plugins/puzzles/src/twiddle.c index b3aa06f1d5..49d8db7825 100644 --- a/apps/plugins/puzzles/src/twiddle.c +++ b/apps/plugins/puzzles/src/twiddle.c | |||
@@ -532,18 +532,6 @@ static void free_game(game_state *state) | |||
532 | sfree(state); | 532 | sfree(state); |
533 | } | 533 | } |
534 | 534 | ||
535 | static int compare_int(const void *av, const void *bv) | ||
536 | { | ||
537 | const int *a = (const int *)av; | ||
538 | const int *b = (const int *)bv; | ||
539 | if (*a < *b) | ||
540 | return -1; | ||
541 | else if (*a > *b) | ||
542 | return +1; | ||
543 | else | ||
544 | return 0; | ||
545 | } | ||
546 | |||
547 | static char *solve_game(const game_state *state, const game_state *currstate, | 535 | static char *solve_game(const game_state *state, const game_state *currstate, |
548 | const char *aux, const char **error) | 536 | const char *aux, const char **error) |
549 | { | 537 | { |
@@ -758,7 +746,7 @@ static game_state *execute_move(const game_state *from, const char *move) | |||
758 | * conveniently being able to get hold of a clean state from | 746 | * conveniently being able to get hold of a clean state from |
759 | * which to practise manoeuvres. | 747 | * which to practise manoeuvres. |
760 | */ | 748 | */ |
761 | qsort(ret->grid, ret->w*ret->h, sizeof(int), compare_int); | 749 | qsort(ret->grid, ret->w*ret->h, sizeof(int), compare_integers); |
762 | for (i = 0; i < ret->w*ret->h; i++) | 750 | for (i = 0; i < ret->w*ret->h; i++) |
763 | ret->grid[i] &= ~3; | 751 | ret->grid[i] &= ~3; |
764 | ret->used_solve = true; | 752 | ret->used_solve = true; |