diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-02-07 23:07:10 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-02-07 23:24:05 +0400 |
commit | b3afbcab8ff2330c1473647be330a3ffe9b11885 (patch) | |
tree | e86b9c7d9676e63b8da92da79889dee13b8be186 /source/blender/editors/armature/armature_utils.c | |
parent | 1c24d954f4ac63f22b703756b6664a4ad1b363d4 (diff) |
ListBase API: add utility api funcs for clearing and checking empty
Diffstat (limited to 'source/blender/editors/armature/armature_utils.c')
-rw-r--r-- | source/blender/editors/armature/armature_utils.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/editors/armature/armature_utils.c b/source/blender/editors/armature/armature_utils.c index 7c7027641d7..52e3285d240 100644 --- a/source/blender/editors/armature/armature_utils.c +++ b/source/blender/editors/armature/armature_utils.c @@ -655,8 +655,7 @@ static void ED_armature_ebone_listbase_free(ListBase *lb) MEM_freeN(ebone); } - lb->first = NULL; - lb->last = NULL; + BLI_listbase_clear(lb); } static void ED_armature_ebone_listbase_copy(ListBase *lb_dst, ListBase *lb_src) @@ -664,7 +663,7 @@ static void ED_armature_ebone_listbase_copy(ListBase *lb_dst, ListBase *lb_src) EditBone *ebone_src; EditBone *ebone_dst; - BLI_assert(lb_dst->first == NULL); + BLI_assert(BLI_listbase_is_empty(lb_dst)); for (ebone_src = lb_src->first; ebone_src; ebone_src = ebone_src->next) { ebone_dst = MEM_dupallocN(ebone_src); |