diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-07-03 15:51:19 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-07-03 17:15:00 +0300 |
commit | f82e52ebc838b666c258090236f0323d0d4f6aee (patch) | |
tree | c3980e3b94e1ff6066a0389d11fe8dee4b5455d6 /source/blender/editors/animation/drivers.c | |
parent | 17ba5660182b59c8c2f0b5afc2f73e91b5ffe151 (diff) |
Cleanup: Editors/Animation, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors/animation` module.
No functional changes.
Diffstat (limited to 'source/blender/editors/animation/drivers.c')
-rw-r--r-- | source/blender/editors/animation/drivers.c | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c index 328e435877c..3b15cd794d8 100644 --- a/source/blender/editors/animation/drivers.c +++ b/source/blender/editors/animation/drivers.c @@ -1020,9 +1020,7 @@ static int add_driver_button_none(bContext *C, wmOperator *op, short mapping_typ return OPERATOR_FINISHED; } - else { - return OPERATOR_CANCELLED; - } + return OPERATOR_CANCELLED; } static int add_driver_button_menu_exec(bContext *C, wmOperator *op) @@ -1032,16 +1030,15 @@ static int add_driver_button_menu_exec(bContext *C, wmOperator *op) /* Just create driver with no targets */ return add_driver_button_none(C, op, mapping_type); } - else { - /* Create Driver using Eyedropper */ - wmOperatorType *ot = WM_operatortype_find("UI_OT_eyedropper_driver", true); - /* XXX: We assume that it's fine to use the same set of properties, - * since they're actually the same. */ - WM_operator_name_call_ptr(C, ot, WM_OP_INVOKE_DEFAULT, op->ptr); + /* Create Driver using Eyedropper */ + wmOperatorType *ot = WM_operatortype_find("UI_OT_eyedropper_driver", true); - return OPERATOR_FINISHED; - } + /* XXX: We assume that it's fine to use the same set of properties, + * since they're actually the same. */ + WM_operator_name_call_ptr(C, ot, WM_OP_INVOKE_DEFAULT, op->ptr); + + return OPERATOR_FINISHED; } /* Show menu or create drivers */ @@ -1054,12 +1051,11 @@ static int add_driver_button_menu_invoke(bContext *C, wmOperator *op, const wmEv /* Mapping Type is Set - Directly go into creating drivers */ return add_driver_button_menu_exec(C, op); } - else { - /* Show menu */ - // TODO: This should get filtered by the enum filter - /* important to execute in the region we're currently in */ - return WM_menu_invoke_ex(C, op, WM_OP_INVOKE_DEFAULT); - } + + /* Show menu */ + // TODO: This should get filtered by the enum filter + /* important to execute in the region we're currently in */ + return WM_menu_invoke_ex(C, op, WM_OP_INVOKE_DEFAULT); } static void UNUSED_FUNCTION(ANIM_OT_driver_button_add_menu)(wmOperatorType *ot) |