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:
authorHans Goudey <h.goudey@me.com>2021-02-24 21:57:49 +0300
committerHans Goudey <h.goudey@me.com>2021-02-24 21:57:49 +0300
commit89196765ba28e3d48e45c0f9f3c69d9d0b5fb624 (patch)
tree5cc0a8d1421334890a8f3775b5785f945ae27c93
parente8a99dda25813aa54497c816bb2f918ce0bdc826 (diff)
Cleanup: Clang tidy else after return
-rw-r--r--source/blender/editors/gpencil/gpencil_interpolate.c33
1 files changed, 16 insertions, 17 deletions
diff --git a/source/blender/editors/gpencil/gpencil_interpolate.c b/source/blender/editors/gpencil/gpencil_interpolate.c
index ae3dae326c0..7c541f61d75 100644
--- a/source/blender/editors/gpencil/gpencil_interpolate.c
+++ b/source/blender/editors/gpencil/gpencil_interpolate.c
@@ -220,28 +220,27 @@ static bool gpencil_stroke_need_flip(Depsgraph *depsgraph,
/* `(S)--->(E) (E)<---(S)` */
return (dist_start >= dist_end);
}
- else {
- /* Oriented inversed with original stroke start near of destination stroke.
- * `(E)<----(S) <--->` */
- dist_start = len_squared_v2v2(v_from_start, v_to_start);
- dist_end = len_squared_v2v2(v_from_start, v_to_end);
- /* `(E)<---(S) (S)--->(E)` */
- return (dist_start < dist_end);
- }
+
+ /* Oriented inversed with original stroke start near of destination stroke.
+ * `(E)<----(S) <--->` */
+ dist_start = len_squared_v2v2(v_from_start, v_to_start);
+ dist_end = len_squared_v2v2(v_from_start, v_to_end);
+ /* `(E)<---(S) (S)--->(E)` */
+ return (dist_start < dist_end);
}
return true;
}
- else {
- /* Check that both vectors have the same direction. */
- float v1[2], v2[2];
- sub_v2_v2v2(v1, v_from_end, v_from_start);
- sub_v2_v2v2(v2, v_to_end, v_to_start);
- mul_v2_v2v2(v1, v1, v2);
- if ((v1[0] < 0.0f) && (v1[1] < 0.0f)) {
- return true;
- }
+
+ /* Check that both vectors have the same direction. */
+ float v1[2], v2[2];
+ sub_v2_v2v2(v1, v_from_end, v_from_start);
+ sub_v2_v2v2(v2, v_to_end, v_to_start);
+ mul_v2_v2v2(v1, v1, v2);
+ if ((v1[0] < 0.0f) && (v1[1] < 0.0f)) {
+ return true;
}
+
return false;
}