summaryrefslogtreecommitdiffstats
path: root/libdimension
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-05-03 10:58:23 -0600
committerTavian Barnes <tavianator@gmail.com>2010-05-03 10:58:23 -0600
commitfed7f6bf2769eadc92fe94a24c1d667f01ed522d (patch)
tree60cbe34644cb58df150d1867a30064e107a69701 /libdimension
parent4b61b9a2d67e8f011840c95d20deef096c2e51a3 (diff)
downloaddimension-fed7f6bf2769eadc92fe94a24c1d667f01ed522d.tar.xz
Remove debugging code from dmnsn_list_sort().
Diffstat (limited to 'libdimension')
-rw-r--r--libdimension/list.c10
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;