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/interface/interface_ops.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source/blender/editors/interface/interface_ops.c') diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c index a1dbbfd037b..cd7d2e27d9a 100644 --- a/source/blender/editors/interface/interface_ops.c +++ b/source/blender/editors/interface/interface_ops.c @@ -92,7 +92,7 @@ static void UI_OT_reset_default_theme(wmOperatorType *ot) /* Copy Data Path Operator ------------------------ */ -static int copy_data_path_button_poll(bContext *C) +static bool copy_data_path_button_poll(bContext *C) { PointerRNA ptr; PropertyRNA *prop; @@ -171,7 +171,7 @@ static void UI_OT_copy_data_path_button(wmOperatorType *ot) RNA_def_property_flag(prop, PROP_SKIP_SAVE); } -static int copy_python_command_button_poll(bContext *C) +static bool copy_python_command_button_poll(bContext *C) { uiBut *but = UI_context_active_but_get(C); @@ -242,7 +242,7 @@ static int operator_button_property_finish(bContext *C, PointerRNA *ptr, Propert } } -static int reset_default_button_poll(bContext *C) +static bool reset_default_button_poll(bContext *C) { PointerRNA ptr; PropertyRNA *prop; @@ -549,7 +549,7 @@ static bool copy_to_selected_button(bContext *C, bool all, bool poll) return success; } -static int copy_to_selected_button_poll(bContext *C) +static bool copy_to_selected_button_poll(bContext *C) { return copy_to_selected_button(C, false, true); } @@ -589,7 +589,7 @@ static void UI_OT_copy_to_selected_button(wmOperatorType *ot) * when there are too many to display... */ -static int reports_to_text_poll(bContext *C) +static bool reports_to_text_poll(bContext *C) { return CTX_wm_reports(C) != NULL; } @@ -1021,7 +1021,7 @@ static void UI_OT_reloadtranslation(wmOperatorType *ot) ot->exec = reloadtranslation_exec; } -int UI_drop_color_poll(struct bContext *C, wmDrag *drag, const wmEvent *UNUSED(event)) +bool UI_drop_color_poll(struct bContext *C, wmDrag *drag, const wmEvent *UNUSED(event)) { /* should only return true for regions that include buttons, for now * return true always */ -- cgit v1.2.3