From d900f5be55d0812eb5c7dfd3ea47020c3edafd41 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 3 Feb 2014 18:55:59 +1100 Subject: Code cleanup: use bools where possible --- source/blender/editors/space_nla/nla_draw.c | 2 +- source/blender/editors/space_nla/nla_edit.c | 6 +++--- source/blender/editors/space_nla/nla_intern.h | 2 +- source/blender/editors/space_nla/nla_ops.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'source/blender/editors/space_nla') diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c index c9a86547984..9f83bc80314 100644 --- a/source/blender/editors/space_nla/nla_draw.c +++ b/source/blender/editors/space_nla/nla_draw.c @@ -641,7 +641,7 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View short indent = 0, offset = 0, sel = 0, group = 0; int special = -1; char name[128]; - short do_draw = FALSE; + bool do_draw = false; /* determine what needs to be drawn */ switch (ale->type) { diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c index 7347b446bce..37efd52f246 100644 --- a/source/blender/editors/space_nla/nla_edit.c +++ b/source/blender/editors/space_nla/nla_edit.c @@ -1587,7 +1587,7 @@ static int nlaedit_sync_actlen_exec(bContext *C, wmOperator *op) ListBase anim_data = {NULL, NULL}; bAnimListElem *ale; int filter; - short active_only = RNA_boolean_get(op->ptr, "active"); + const bool active_only = RNA_boolean_get(op->ptr, "active"); /* get editor data */ if (ANIM_animdata_get_context(C, &ac) == 0) @@ -2004,7 +2004,7 @@ static int nla_fmodifier_add_exec(bContext *C, wmOperator *op) FModifier *fcm; int type = RNA_enum_get(op->ptr, "type"); - short onlyActive = RNA_boolean_get(op->ptr, "only_active"); + const bool active_only = RNA_boolean_get(op->ptr, "only_active"); /* get editor data */ if (ANIM_animdata_get_context(C, &ac) == 0) @@ -2021,7 +2021,7 @@ static int nla_fmodifier_add_exec(bContext *C, wmOperator *op) for (strip = nlt->strips.first; strip; strip = strip->next) { /* can F-Modifier be added to the current strip? */ - if (onlyActive) { + if (active_only) { /* if not active, cannot add since we're only adding to active strip */ if ((strip->flag & NLASTRIP_FLAG_ACTIVE) == 0) continue; diff --git a/source/blender/editors/space_nla/nla_intern.h b/source/blender/editors/space_nla/nla_intern.h index 2ad2418fc77..dedd6404a2c 100644 --- a/source/blender/editors/space_nla/nla_intern.h +++ b/source/blender/editors/space_nla/nla_intern.h @@ -141,7 +141,7 @@ void NLA_OT_selected_objects_add(wmOperatorType *ot); int nlaop_poll_tweakmode_off(bContext *C); int nlaop_poll_tweakmode_on(bContext *C); -short nlaedit_is_tweakmode_on(bAnimContext *ac); +bool nlaedit_is_tweakmode_on(bAnimContext *ac); /* --- */ diff --git a/source/blender/editors/space_nla/nla_ops.c b/source/blender/editors/space_nla/nla_ops.c index aa3224507bc..149690e10f7 100644 --- a/source/blender/editors/space_nla/nla_ops.c +++ b/source/blender/editors/space_nla/nla_ops.c @@ -101,10 +101,10 @@ int nlaop_poll_tweakmode_on(bContext *C) } /* is tweakmode enabled - for use in NLA operator code */ -short nlaedit_is_tweakmode_on(bAnimContext *ac) +bool nlaedit_is_tweakmode_on(bAnimContext *ac) { if (ac && ac->scene) - return (ac->scene->flag & SCE_NLA_EDIT_ON); + return (ac->scene->flag & SCE_NLA_EDIT_ON) != 0; return 0; } -- cgit v1.2.3