From b88e51dd55c62bdc160f33f9b2ae1727a892560a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 2 Jul 2018 11:47:00 +0200 Subject: Cleanup: use bool for poll functions --- source/blender/editors/space_nla/nla_buttons.c | 12 ++++++------ source/blender/editors/space_nla/nla_channels.c | 2 +- source/blender/editors/space_nla/nla_intern.h | 4 ++-- source/blender/editors/space_nla/nla_ops.c | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) (limited to 'source/blender/editors/space_nla') diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c index a26e6b0280e..659a36c4a23 100644 --- a/source/blender/editors/space_nla/nla_buttons.c +++ b/source/blender/editors/space_nla/nla_buttons.c @@ -184,31 +184,31 @@ bool nla_panel_context(const bContext *C, PointerRNA *adt_ptr, PointerRNA *nlt_p } #if 0 -static int nla_panel_poll(const bContext *C, PanelType *pt) +static bool nla_panel_poll(const bContext *C, PanelType *pt) { return nla_panel_context(C, NULL, NULL); } #endif -static int nla_animdata_panel_poll(const bContext *C, PanelType *UNUSED(pt)) +static bool nla_animdata_panel_poll(const bContext *C, PanelType *UNUSED(pt)) { PointerRNA ptr; return (nla_panel_context(C, &ptr, NULL, NULL) && (ptr.data != NULL)); } -static int nla_track_panel_poll(const bContext *C, PanelType *UNUSED(pt)) +static bool nla_track_panel_poll(const bContext *C, PanelType *UNUSED(pt)) { PointerRNA ptr; return (nla_panel_context(C, NULL, &ptr, NULL) && (ptr.data != NULL)); } -static int nla_strip_panel_poll(const bContext *C, PanelType *UNUSED(pt)) +static bool nla_strip_panel_poll(const bContext *C, PanelType *UNUSED(pt)) { PointerRNA ptr; return (nla_panel_context(C, NULL, NULL, &ptr) && (ptr.data != NULL)); } -static int nla_strip_actclip_panel_poll(const bContext *C, PanelType *UNUSED(pt)) +static bool nla_strip_actclip_panel_poll(const bContext *C, PanelType *UNUSED(pt)) { PointerRNA ptr; NlaStrip *strip; @@ -222,7 +222,7 @@ static int nla_strip_actclip_panel_poll(const bContext *C, PanelType *UNUSED(pt) return (strip->type == NLASTRIP_TYPE_CLIP); } -static int nla_strip_eval_panel_poll(const bContext *C, PanelType *UNUSED(pt)) +static bool nla_strip_eval_panel_poll(const bContext *C, PanelType *UNUSED(pt)) { PointerRNA ptr; NlaStrip *strip; diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c index 8fdba4ce60d..9bb25724daf 100644 --- a/source/blender/editors/space_nla/nla_channels.c +++ b/source/blender/editors/space_nla/nla_channels.c @@ -509,7 +509,7 @@ void NLA_OT_action_pushdown(wmOperatorType *ot) /* ******************** Action Unlink ******************************** */ -static int nla_action_unlink_poll(bContext *C) +static bool nla_action_unlink_poll(bContext *C) { if (ED_operator_nla_active(C)) { return nla_panel_context(C, NULL, NULL, NULL); diff --git a/source/blender/editors/space_nla/nla_intern.h b/source/blender/editors/space_nla/nla_intern.h index c090b3b8106..a00e71a192d 100644 --- a/source/blender/editors/space_nla/nla_intern.h +++ b/source/blender/editors/space_nla/nla_intern.h @@ -148,8 +148,8 @@ void NLA_OT_selected_objects_add(wmOperatorType *ot); /* **************************************** */ /* nla_ops.c */ -int nlaop_poll_tweakmode_off(bContext *C); -int nlaop_poll_tweakmode_on(bContext *C); +bool nlaop_poll_tweakmode_off(bContext *C); +bool nlaop_poll_tweakmode_on(bContext *C); 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 0c087fa67b9..5bfd73b8163 100644 --- a/source/blender/editors/space_nla/nla_ops.c +++ b/source/blender/editors/space_nla/nla_ops.c @@ -52,7 +52,7 @@ /* ************************** poll callbacks for operators **********************************/ /* tweakmode is NOT enabled */ -int nlaop_poll_tweakmode_off(bContext *C) +bool nlaop_poll_tweakmode_off(bContext *C) { Scene *scene; @@ -74,7 +74,7 @@ int nlaop_poll_tweakmode_off(bContext *C) } /* tweakmode IS enabled */ -int nlaop_poll_tweakmode_on(bContext *C) +bool nlaop_poll_tweakmode_on(bContext *C) { Scene *scene; -- cgit v1.2.3