[Bf-blender-cvs] [6ebce7e] master: fix typo in condition
Mike Erwin
noreply at git.blender.org
Thu Jul 21 21:54:42 CEST 2016
Commit: 6ebce7e9480c87c5d574f1d48242c8272b873964
Author: Mike Erwin
Date: Thu Jul 21 14:13:20 2016 -0400
Branches: master
https://developer.blender.org/rB6ebce7e9480c87c5d574f1d48242c8272b873964
fix typo in condition
(A - A).norm() is always 0 so condition is always true.
(A - B).norm() and (B - A).norm() both compute the same distance so I
picked one to match surrounding code.
Found with PVS-Studio T48917
===================================================================
M source/blender/freestyle/intern/stroke/Curve.cpp
===================================================================
diff --git a/source/blender/freestyle/intern/stroke/Curve.cpp b/source/blender/freestyle/intern/stroke/Curve.cpp
index 69c5dcd..a8dbce8 100644
--- a/source/blender/freestyle/intern/stroke/Curve.cpp
+++ b/source/blender/freestyle/intern/stroke/Curve.cpp
@@ -133,7 +133,7 @@ iA_B_eq_iB_A:
//_t2d = t3;
_t2d = t2 * t3;
}
- else if ((iA->getPoint2D() - iA->getPoint2D()).norm() < 1.0e-6) {
+ else if ((iA->getPoint2D() - iB->getPoint2D()).norm() < 1.0e-6) {
__A = iB->A();
__B = iB->B();
//_t2d = t3;
More information about the Bf-blender-cvs
mailing list