summaryrefslogtreecommitdiff
path: root/basegfx/source/workbench
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2012-06-06 22:40:37 +0200
committerJulien Nabet <serval2412@yahoo.fr>2012-06-06 22:41:07 +0200
commitc9e4cc279371a87495bfbc7c52f56686f9ab42c9 (patch)
tree4873a45c425c980404253267c981524ed00cbe7d /basegfx/source/workbench
parent633178bffaf23ae322060e2c304c9c2cf12b46cc (diff)
Some cppcheck cleaning
Change-Id: I7a5f34715faecd689900b5d41eae9c782e99b47b
Diffstat (limited to 'basegfx/source/workbench')
-rw-r--r--basegfx/source/workbench/bezierclip.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/basegfx/source/workbench/bezierclip.cxx b/basegfx/source/workbench/bezierclip.cxx
index 2070e760c7c0..68c8e3f83a60 100644
--- a/basegfx/source/workbench/bezierclip.cxx
+++ b/basegfx/source/workbench/bezierclip.cxx
@@ -232,7 +232,7 @@ bool Impl_calcSafeParams( double& t1,
{
// calc intersection of convex hull segment with
// one of the horizontal bounds lines
- const double r_x( p1.x - p0.x );
+ // to optimize a bit, r_x is calculated only in else case
const double r_y( p1.y - p0.y );
if( tolZero(r_y) )
@@ -252,6 +252,7 @@ bool Impl_calcSafeParams( double& t1,
{
// check against lower and higher bounds
// =====================================
+ const double r_x( p1.x - p0.x );
// calc intersection with horizontal dMin line
const double currTLow( (lowerYBound - p0.y) * r_x / r_y + p0.x );