Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2020-08-07 12:23:02 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-08-07 12:23:02 +0300
commita29686eeb3af051a00fbb8a8b9be06bcd050ec8c (patch)
tree9da60e7257e3e2dafda3e9b565b77c9c6f37675b /source/blender/editors/uvedit
parente0c51b466f3b23a1fc114690be2b008e19637ea6 (diff)
Cleanup: Blenlib, Clang-Tidy else-after-return fixes (incomplete)
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/blenlib` module. Not all warnings are addressed in this commit. No functional changes.
Diffstat (limited to 'source/blender/editors/uvedit')
-rw-r--r--source/blender/editors/uvedit/uvedit_rip.c25
-rw-r--r--source/blender/editors/uvedit/uvedit_unwrap_ops.c6
2 files changed, 14 insertions, 17 deletions
diff --git a/source/blender/editors/uvedit/uvedit_rip.c b/source/blender/editors/uvedit/uvedit_rip.c
index 07bec2da1ae..421e58b1cb5 100644
--- a/source/blender/editors/uvedit/uvedit_rip.c
+++ b/source/blender/editors/uvedit/uvedit_rip.c
@@ -538,23 +538,22 @@ static bool uv_rip_pairs_loop_change_sides_test(BMLoop *l_switch,
if (count_a + count_b == 4) {
return count_a > count_b;
}
- else {
- const float angle_a_before = uv_rip_pairs_calc_uv_angle(
- l_switch, side_a, aspect_y, cd_loop_uv_offset);
- const float angle_b_before = uv_rip_pairs_calc_uv_angle(
- l_target, side_b, aspect_y, cd_loop_uv_offset);
- UL(l_switch)->side = side_b;
+ const float angle_a_before = uv_rip_pairs_calc_uv_angle(
+ l_switch, side_a, aspect_y, cd_loop_uv_offset);
+ const float angle_b_before = uv_rip_pairs_calc_uv_angle(
+ l_target, side_b, aspect_y, cd_loop_uv_offset);
- const float angle_a_after = uv_rip_pairs_calc_uv_angle(
- l_switch, side_a, aspect_y, cd_loop_uv_offset);
- const float angle_b_after = uv_rip_pairs_calc_uv_angle(
- l_target, side_b, aspect_y, cd_loop_uv_offset);
+ UL(l_switch)->side = side_b;
- UL(l_switch)->side = side_a;
+ const float angle_a_after = uv_rip_pairs_calc_uv_angle(
+ l_switch, side_a, aspect_y, cd_loop_uv_offset);
+ const float angle_b_after = uv_rip_pairs_calc_uv_angle(
+ l_target, side_b, aspect_y, cd_loop_uv_offset);
- return fabsf(angle_a_before - angle_b_before) > fabsf(angle_a_after - angle_b_after);
- }
+ UL(l_switch)->side = side_a;
+
+ return fabsf(angle_a_before - angle_b_before) > fabsf(angle_a_after - angle_b_after);
}
/**
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
index 2f30ef1caa6..9f77bf31481 100644
--- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c
+++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
@@ -1885,12 +1885,10 @@ static int smart_uv_project_thickface_area_cmp_fn(const void *tf_a_p, const void
if (tf_a->area < tf_b->area) {
return 1;
}
- else if (tf_a->area > tf_b->area) {
+ if (tf_a->area > tf_b->area) {
return -1;
}
- else {
- return 0;
- }
+ return 0;
}
static uint smart_uv_project_calculate_project_normals(const ThickFace *thick_faces,