diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-07-03 16:42:22 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-07-03 17:15:01 +0300 |
commit | de7c9f41e613a704f8e3258050b952d2ada60083 (patch) | |
tree | 2fa974caba4f9450e22f8d4da9400387b536dd16 /source/blender/editors/object/object_shader_fx.c | |
parent | 19483125f8da79cb270cb8d6df76b2e67100c089 (diff) |
Cleanup: Editors/Object, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors/object` module.
No functional changes.
Diffstat (limited to 'source/blender/editors/object/object_shader_fx.c')
-rw-r--r-- | source/blender/editors/object/object_shader_fx.c | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/source/blender/editors/object/object_shader_fx.c b/source/blender/editors/object/object_shader_fx.c index d9f37b8e38b..8df87a8a2f9 100644 --- a/source/blender/editors/object/object_shader_fx.c +++ b/source/blender/editors/object/object_shader_fx.c @@ -367,13 +367,12 @@ static int edit_shaderfx_invoke_properties(bContext *C, wmOperator *op) if (RNA_struct_property_is_set(op->ptr, "shaderfx")) { return true; } - else { - PointerRNA ptr = CTX_data_pointer_get_type(C, "shaderfx", &RNA_ShaderFx); - if (ptr.data) { - fx = ptr.data; - RNA_string_set(op->ptr, "shaderfx", fx->name); - return true; - } + + PointerRNA ptr = CTX_data_pointer_get_type(C, "shaderfx", &RNA_ShaderFx); + if (ptr.data) { + fx = ptr.data; + RNA_string_set(op->ptr, "shaderfx", fx->name); + return true; } return false; @@ -418,9 +417,7 @@ static int shaderfx_remove_invoke(bContext *C, wmOperator *op, const wmEvent *UN if (edit_shaderfx_invoke_properties(C, op)) { return shaderfx_remove_exec(C, op); } - else { - return OPERATOR_CANCELLED; - } + return OPERATOR_CANCELLED; } void OBJECT_OT_shaderfx_remove(wmOperatorType *ot) @@ -460,9 +457,7 @@ static int shaderfx_move_up_invoke(bContext *C, wmOperator *op, const wmEvent *U if (edit_shaderfx_invoke_properties(C, op)) { return shaderfx_move_up_exec(C, op); } - else { - return OPERATOR_CANCELLED; - } + return OPERATOR_CANCELLED; } void OBJECT_OT_shaderfx_move_up(wmOperatorType *ot) @@ -502,9 +497,7 @@ static int shaderfx_move_down_invoke(bContext *C, wmOperator *op, const wmEvent if (edit_shaderfx_invoke_properties(C, op)) { return shaderfx_move_down_exec(C, op); } - else { - return OPERATOR_CANCELLED; - } + return OPERATOR_CANCELLED; } void OBJECT_OT_shaderfx_move_down(wmOperatorType *ot) @@ -550,9 +543,7 @@ static int shaderfx_move_to_index_invoke(bContext *C, wmOperator *op, const wmEv if (edit_shaderfx_invoke_properties(C, op)) { return shaderfx_move_to_index_exec(C, op); } - else { - return OPERATOR_CANCELLED; - } + return OPERATOR_CANCELLED; } void OBJECT_OT_shaderfx_move_to_index(wmOperatorType *ot) |