diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-07-03 15:52:32 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-07-03 17:15:00 +0300 |
commit | 7d0a0b8a6da0e1cd41a1b40971e7c803ed162963 (patch) | |
tree | 03ae0a0eab32e9d7101f78e4a2dc20f0c58af88b /source/blender/editors/armature/pose_slide.c | |
parent | f82e52ebc838b666c258090236f0323d0d4f6aee (diff) |
Cleanup: Editors/Armature, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors/armature` module.
No functional changes.
Diffstat (limited to 'source/blender/editors/armature/pose_slide.c')
-rw-r--r-- | source/blender/editors/armature/pose_slide.c | 52 |
1 files changed, 21 insertions, 31 deletions
diff --git a/source/blender/editors/armature/pose_slide.c b/source/blender/editors/armature/pose_slide.c index d9621dba730..8df9c99896e 100644 --- a/source/blender/editors/armature/pose_slide.c +++ b/source/blender/editors/armature/pose_slide.c @@ -1122,7 +1122,7 @@ static int pose_slide_modal(bContext *C, wmOperator *op, const wmEvent *event) do_pose_update = true; break; } - else if (event->val == KM_PRESS) { + if (event->val == KM_PRESS) { switch (event->type) { /* Transform Channel Limits */ /* XXX: Replace these hardcoded hotkeys with a modalmap that can be customised */ @@ -1307,9 +1307,8 @@ static int pose_slide_push_invoke(bContext *C, wmOperator *op, const wmEvent *ev pose_slide_exit(op); return OPERATOR_CANCELLED; } - else { - pso = op->customdata; - } + + pso = op->customdata; /* initialise percentage so that it won't pop on first mouse move */ pose_slide_mouse_update_percentage(pso, op, event); @@ -1328,9 +1327,8 @@ static int pose_slide_push_exec(bContext *C, wmOperator *op) pose_slide_exit(op); return OPERATOR_CANCELLED; } - else { - pso = op->customdata; - } + + pso = op->customdata; /* do common exec work */ return pose_slide_exec_common(C, op, pso); @@ -1369,9 +1367,8 @@ static int pose_slide_relax_invoke(bContext *C, wmOperator *op, const wmEvent *e pose_slide_exit(op); return OPERATOR_CANCELLED; } - else { - pso = op->customdata; - } + + pso = op->customdata; /* initialise percentage so that it won't pop on first mouse move */ pose_slide_mouse_update_percentage(pso, op, event); @@ -1390,9 +1387,8 @@ static int pose_slide_relax_exec(bContext *C, wmOperator *op) pose_slide_exit(op); return OPERATOR_CANCELLED; } - else { - pso = op->customdata; - } + + pso = op->customdata; /* do common exec work */ return pose_slide_exec_common(C, op, pso); @@ -1430,9 +1426,8 @@ static int pose_slide_push_rest_invoke(bContext *C, wmOperator *op, const wmEven pose_slide_exit(op); return OPERATOR_CANCELLED; } - else { - pso = op->customdata; - } + + pso = op->customdata; /* initialise percentage so that it won't pop on first mouse move */ pose_slide_mouse_update_percentage(pso, op, event); @@ -1451,9 +1446,8 @@ static int pose_slide_push_rest_exec(bContext *C, wmOperator *op) pose_slide_exit(op); return OPERATOR_CANCELLED; } - else { - pso = op->customdata; - } + + pso = op->customdata; /* do common exec work */ return pose_slide_exec_common(C, op, pso); @@ -1492,9 +1486,8 @@ static int pose_slide_relax_rest_invoke(bContext *C, wmOperator *op, const wmEve pose_slide_exit(op); return OPERATOR_CANCELLED; } - else { - pso = op->customdata; - } + + pso = op->customdata; /* initialise percentage so that it won't pop on first mouse move */ pose_slide_mouse_update_percentage(pso, op, event); @@ -1513,9 +1506,8 @@ static int pose_slide_relax_rest_exec(bContext *C, wmOperator *op) pose_slide_exit(op); return OPERATOR_CANCELLED; } - else { - pso = op->customdata; - } + + pso = op->customdata; /* do common exec work */ return pose_slide_exec_common(C, op, pso); @@ -1554,9 +1546,8 @@ static int pose_slide_breakdown_invoke(bContext *C, wmOperator *op, const wmEven pose_slide_exit(op); return OPERATOR_CANCELLED; } - else { - pso = op->customdata; - } + + pso = op->customdata; /* initialise percentage so that it won't pop on first mouse move */ pose_slide_mouse_update_percentage(pso, op, event); @@ -1575,9 +1566,8 @@ static int pose_slide_breakdown_exec(bContext *C, wmOperator *op) pose_slide_exit(op); return OPERATOR_CANCELLED; } - else { - pso = op->customdata; - } + + pso = op->customdata; /* do common exec work */ return pose_slide_exec_common(C, op, pso); |