diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-07-03 18:30:09 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-07-03 18:42:45 +0300 |
commit | 367034f210137754ab4f07a0e7793066d2b69e59 (patch) | |
tree | c3d00a054e8216c24180b7bf2db16c2366a3101c /source/blender/editors/uvedit/uvedit_smart_stitch.c | |
parent | 651d1aa7c836892e95117e17716605a774c0220b (diff) |
Cleanup: Editors/Space/UV-Edit, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors/uv_edit` module.
No functional changes.
Diffstat (limited to 'source/blender/editors/uvedit/uvedit_smart_stitch.c')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_smart_stitch.c | 38 |
1 files changed, 12 insertions, 26 deletions
diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c index 594847b7249..38bd928e7b1 100644 --- a/source/blender/editors/uvedit/uvedit_smart_stitch.c +++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c @@ -320,9 +320,7 @@ static int getNumOfIslandUvs(UvElementMap *elementMap, int island) if (island == elementMap->totalIslands - 1) { return elementMap->totalUVs - elementMap->islandIndices[island]; } - else { - return elementMap->islandIndices[island + 1] - elementMap->islandIndices[island]; - } + return elementMap->islandIndices[island + 1] - elementMap->islandIndices[island]; } static void stitch_uv_rotate(float mat[2][2], float medianPoint[2], float uv[2], float aspect) @@ -367,13 +365,9 @@ static bool stitch_check_uvs_stitchable(UvElement *element, fabsf(luv->uv[1] - luv_iter->uv[1]) < limit) { return 1; } - else { - return 0; - } - } - else { - return 1; + return 0; } + return 1; } static bool stitch_check_edges_stitchable(UvEdge *edge, @@ -411,13 +405,9 @@ static bool stitch_check_edges_stitchable(UvEdge *edge, fabsf(luv_orig2->uv[1] - luv_iter2->uv[1]) < limit) { return 1; } - else { - return 0; - } - } - else { - return 1; + return 0; } + return 1; } static bool stitch_check_uvs_state_stitchable(UvElement *element, @@ -2535,10 +2525,8 @@ static int stitch_exec(bContext *C, wmOperator *op) stitch_exit(C, op, 1); return OPERATOR_FINISHED; } - else { - stitch_cancel(C, op); - return OPERATOR_CANCELLED; - } + stitch_cancel(C, op); + return OPERATOR_CANCELLED; } static StitchState *stitch_select(bContext *C, @@ -2619,14 +2607,12 @@ static int stitch_modal(bContext *C, wmOperator *op, const wmEvent *event) stitch_exit(C, op, 1); return OPERATOR_FINISHED; } - else { - stitch_cancel(C, op); - return OPERATOR_CANCELLED; - } - } - else { - return OPERATOR_PASS_THROUGH; + + stitch_cancel(C, op); + return OPERATOR_CANCELLED; } + return OPERATOR_PASS_THROUGH; + /* Increase limit */ case EVT_PADPLUSKEY: case WHEELUPMOUSE: |