Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Poirier <theeth@yahoo.com>2007-11-07 03:28:45 +0300
committerMartin Poirier <theeth@yahoo.com>2007-11-07 03:28:45 +0300
commitec13425eab373e23ced76df7de732446ae363519 (patch)
tree3846cd91308d4bef60f4747d80e85ef8c1acfc4f /source/blender/blenlib
parent0de103c1cdf1e4c40cfad4e233a42a6d1165953d (diff)
Initial commit for Harmonic Skeleton generation.
This is very much a work in progress commit to allow me to work outside of home. While it does somewhat work, I wouldn't recommend anyone to use it.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/intern/util.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/source/blender/blenlib/intern/util.c b/source/blender/blenlib/intern/util.c
index 8e396eec09d..3d0fa9b7f5a 100644
--- a/source/blender/blenlib/intern/util.c
+++ b/source/blender/blenlib/intern/util.c
@@ -324,9 +324,10 @@ void BLI_sortlist(ListBase *listbase, int (*cmp)(void *, void *))
if (listbase->first != listbase->last)
{
- for( previous = listbase->first, current = previous->next; current; previous = current, current = next )
+ for( previous = listbase->first, current = previous->next; current; current = next )
{
next = current->next;
+ previous = current->prev;
BLI_remlink(listbase, current);
@@ -335,14 +336,7 @@ void BLI_sortlist(ListBase *listbase, int (*cmp)(void *, void *))
previous = previous->prev;
}
- if (previous == NULL)
- {
- BLI_addhead(listbase, current);
- }
- else
- {
- BLI_insertlinkafter(listbase, previous, current);
- }
+ BLI_insertlinkafter(listbase, previous, current);
}
}
}