From 9ce1a04e2aa19a2746f0947bd8d8391f680cc90d Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Fri, 18 Sep 2020 20:51:22 +0200 Subject: Cleanup: Resolve warnings Unused variables, missing include for declaration, missing 'static' specifier. Also rename function to match naming convention. --- source/blender/editors/object/object_modes.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/object') diff --git a/source/blender/editors/object/object_modes.c b/source/blender/editors/object/object_modes.c index caba10c820b..79846b42c65 100644 --- a/source/blender/editors/object/object_modes.c +++ b/source/blender/editors/object/object_modes.c @@ -57,6 +57,7 @@ #include "WM_toolsystem.h" #include "ED_object.h" /* own include */ +#include "object_intern.h" /* -------------------------------------------------------------------- */ /** \name High Level Mode Operations @@ -406,7 +407,7 @@ bool ED_object_mode_generic_has_data(struct Depsgraph *depsgraph, struct Object * * \{ */ -bool OBJECT_switch_object_poll(bContext *C) +static bool object_switch_object_poll(bContext *C) { Object *ob = CTX_data_active_object(C); if (!CTX_wm_region_view3d(C)) { @@ -415,7 +416,7 @@ bool OBJECT_switch_object_poll(bContext *C) return ob && ELEM(ob->mode, OB_MODE_EDIT, OB_MODE_SCULPT); } -static int object_switch_object_invoke(bContext *C, wmOperator *op, const wmEvent *event) +static int object_switch_object_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *event) { Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); @@ -502,7 +503,7 @@ void OBJECT_OT_switch_object(wmOperatorType *ot) /* api callbacks */ ot->invoke = object_switch_object_invoke; - ot->poll = OBJECT_switch_object_poll; + ot->poll = object_switch_object_poll; ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } -- cgit v1.2.3