diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-11-16 16:23:37 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-11-16 16:23:37 +0300 |
commit | c31f74de6bb7938ce0e36f75caeedfa16ac90b53 (patch) | |
tree | a1f10b56b9e6c06f4a66287ba16b5eced9fdb4c4 /source/blender/editors/space_nla | |
parent | 0e60accf2afa4fc69da99743bb64d82cb3e0fbc4 (diff) |
Cleanup: use BLI_listbase_count_ex to avoid redundant looping
Diffstat (limited to 'source/blender/editors/space_nla')
-rw-r--r-- | source/blender/editors/space_nla/nla_edit.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c index 37efe1afcf5..f43982fac8b 100644 --- a/source/blender/editors/space_nla/nla_edit.c +++ b/source/blender/editors/space_nla/nla_edit.c @@ -1436,7 +1436,9 @@ static int nlaedit_swap_exec(bContext *C, wmOperator *op) if (BLI_listbase_is_empty(&nlt->strips) == false) { NlaStrip *mstrip = (NlaStrip *)nlt->strips.first; - if ((mstrip->flag & NLASTRIP_FLAG_TEMP_META) && (BLI_listbase_count(&mstrip->strips) == 2)) { + if ((mstrip->flag & NLASTRIP_FLAG_TEMP_META) && + (BLI_listbase_count_ex(&mstrip->strips, 3) == 2)) + { /* remove this temp meta, so that we can see the strips inside */ BKE_nlastrips_clear_metas(&nlt->strips, 0, 1); } |