[Libreoffice-commits] core.git: basegfx/source
Tor Lillqvist
tml at collabora.com
Tue Jan 19 02:10:19 PST 2016
basegfx/source/polygon/b2dpolygoncutandtouch.cxx | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
New commits:
commit 6dfcaa89b542efac7561a956fb8bfaf39c3b89de
Author: Tor Lillqvist <tml at collabora.com>
Date: Tue Jan 19 11:58:03 2016 +0200
Bin unneeded variable
As far as I see, the only use of aNormalizedEdgeVector is as a
parameter to areParallel(), and there is no need for that to be
normalized, is there?
Change-Id: I31ca09391894ab441e5b88dbdd636cf4b91ac5c2
diff --git a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
index 71804b3..378c858 100644
--- a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
+++ b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
@@ -620,8 +620,6 @@ namespace basegfx
{
const B2DRange aRange(rCurr, rNext);
const B2DVector aEdgeVector(rNext - rCurr);
- B2DVector aNormalizedEdgeVector(aEdgeVector);
- aNormalizedEdgeVector.normalize();
bool bTestUsingX(fabs(aEdgeVector.getX()) > fabs(aEdgeVector.getY()));
for(sal_uInt32 a(0L); a < nPointCount; a++)
@@ -634,7 +632,7 @@ namespace basegfx
{
const B2DVector aTestVector(aTestPoint - rCurr);
- if(areParallel(aNormalizedEdgeVector, aTestVector))
+ if(areParallel(aEdgeVector, aTestVector))
{
const double fCut((bTestUsingX)
? aTestVector.getX() / aEdgeVector.getX()
More information about the Libreoffice-commits
mailing list