diff options
author | Tavian Barnes <tavianator@gmail.com> | 2010-05-03 10:58:23 -0600 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2010-05-03 10:58:23 -0600 |
commit | fed7f6bf2769eadc92fe94a24c1d667f01ed522d (patch) | |
tree | 60cbe34644cb58df150d1867a30064e107a69701 /libdimension | |
parent | 4b61b9a2d67e8f011840c95d20deef096c2e51a3 (diff) | |
download | dimension-fed7f6bf2769eadc92fe94a24c1d667f01ed522d.tar.xz |
Remove debugging code from dmnsn_list_sort().
Diffstat (limited to 'libdimension')
-rw-r--r-- | libdimension/list.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/libdimension/list.c b/libdimension/list.c index 4851e94..0bd8f1e 100644 --- a/libdimension/list.c +++ b/libdimension/list.c @@ -83,19 +83,13 @@ dmnsn_list_sort(dmnsn_list *list, dmnsn_comparator_fn *comparator) dmnsn_list *half = dmnsn_list_split(list); dmnsn_list_sort(list, comparator); dmnsn_list_sort(half, comparator); - dmnsn_list_iterator *ii; dmnsn_list_iterator *i = list->first, *j = half->first; while (i || j) { if (!i) { - dmnsn_list_iterator *temp = dmnsn_list_next(j); - dmnsn_list_iterator_remove(half, j); - dmnsn_list_iterator_insert(list, i, j); - j = temp; - continue; - j->prev = list->last; - list->last = j; + list->last->next = j; + list->last = half->last; list->length += half->length; half->first = half->last = NULL; half->length = 0; |