diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-07-03 18:30:31 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-07-03 18:42:46 +0300 |
commit | 33a74941c5fd4efb6eefcaace3315d3e2b65681f (patch) | |
tree | 2d3da68b73e4419750c7f767bbb78bf1a303ad18 /source/blender/editors/physics/rigidbody_object.c | |
parent | 367034f210137754ab4f07a0e7793066d2b69e59 (diff) |
Cleanup: Editors, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors` module.
No functional changes.
Diffstat (limited to 'source/blender/editors/physics/rigidbody_object.c')
-rw-r--r-- | source/blender/editors/physics/rigidbody_object.c | 35 |
1 files changed, 10 insertions, 25 deletions
diff --git a/source/blender/editors/physics/rigidbody_object.c b/source/blender/editors/physics/rigidbody_object.c index 78369345b9a..b91385c502c 100644 --- a/source/blender/editors/physics/rigidbody_object.c +++ b/source/blender/editors/physics/rigidbody_object.c @@ -73,9 +73,7 @@ static bool ED_operator_rigidbody_active_poll(bContext *C) Object *ob = ED_object_active_context(C); return (ob && ob->rigidbody_object); } - else { - return 0; - } + return 0; } static bool ED_operator_rigidbody_add_poll(bContext *C) @@ -91,9 +89,7 @@ static bool ED_operator_rigidbody_add_poll(bContext *C) Object *ob = ED_object_active_context(C); return (ob && ob->type == OB_MESH); } - else { - return false; - } + return false; } /* ----------------- */ @@ -135,9 +131,7 @@ static int rigidbody_object_add_exec(bContext *C, wmOperator *op) /* done */ return OPERATOR_FINISHED; } - else { - return OPERATOR_CANCELLED; - } + return OPERATOR_CANCELLED; } void RIGIDBODY_OT_object_add(wmOperatorType *ot) @@ -186,10 +180,9 @@ static int rigidbody_object_remove_exec(bContext *C, wmOperator *op) /* done */ return OPERATOR_FINISHED; } - else { - BKE_report(op->reports, RPT_ERROR, "Object has no Rigid Body settings to remove"); - return OPERATOR_CANCELLED; - } + + BKE_report(op->reports, RPT_ERROR, "Object has no Rigid Body settings to remove"); + return OPERATOR_CANCELLED; } void RIGIDBODY_OT_object_remove(wmOperatorType *ot) @@ -233,9 +226,7 @@ static int rigidbody_objects_add_exec(bContext *C, wmOperator *op) /* done */ return OPERATOR_FINISHED; } - else { - return OPERATOR_CANCELLED; - } + return OPERATOR_CANCELLED; } void RIGIDBODY_OT_objects_add(wmOperatorType *ot) @@ -286,9 +277,7 @@ static int rigidbody_objects_remove_exec(bContext *C, wmOperator *UNUSED(op)) /* done */ return OPERATOR_FINISHED; } - else { - return OPERATOR_CANCELLED; - } + return OPERATOR_CANCELLED; } void RIGIDBODY_OT_objects_remove(wmOperatorType *ot) @@ -340,9 +329,7 @@ static int rigidbody_objects_shape_change_exec(bContext *C, wmOperator *op) /* done */ return OPERATOR_FINISHED; } - else { - return OPERATOR_CANCELLED; - } + return OPERATOR_CANCELLED; } void RIGIDBODY_OT_shape_change(wmOperatorType *ot) @@ -531,9 +518,7 @@ static int rigidbody_objects_calc_mass_exec(bContext *C, wmOperator *op) /* done */ return OPERATOR_FINISHED; } - else { - return OPERATOR_CANCELLED; - } + return OPERATOR_CANCELLED; } void RIGIDBODY_OT_mass_calculate(wmOperatorType *ot) |