summaryrefslogtreecommitdiff
path: root/basegfx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-03-06 11:05:49 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-03-08 07:20:29 +0100
commit5c23459245f566831383934dd64d19e002bfcfcb (patch)
tree27d92a2167c6245c3be7844e2bbe7b6e624f0f9e /basegfx
parent4a7771ffa8d98d08dffbba90fd42d1ab75e056fe (diff)
new loplugin constvars
detect static variables that can be made const. Thanks to mike kaganski for suggesting this. Here I introduce a new plugin feature - using markers in nearby comments to disable the plugin for specific vars. Some of this stuff was old debugging code. I removed the stuff that was older than 5 years. Change-Id: I6ec7742a7fdadf28fd128b592fcdf6da8257585c Reviewed-on: https://gerrit.libreoffice.org/68807 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basegfx')
-rw-r--r--basegfx/source/curve/b2dcubicbezier.cxx2
-rw-r--r--basegfx/source/raster/rasterconvert3d.cxx3
-rw-r--r--basegfx/test/B2DHomMatrixTest.cxx8
3 files changed, 6 insertions, 7 deletions
diff --git a/basegfx/source/curve/b2dcubicbezier.cxx b/basegfx/source/curve/b2dcubicbezier.cxx
index 9584eeded3c0..e1fad1e8a552 100644
--- a/basegfx/source/curve/b2dcubicbezier.cxx
+++ b/basegfx/source/curve/b2dcubicbezier.cxx
@@ -30,7 +30,7 @@
// #i37443#
#define FACTOR_FOR_UNSHARPEN (1.6)
#ifdef DBG_UTIL
-static double fMultFactUnsharpen = FACTOR_FOR_UNSHARPEN;
+static const double fMultFactUnsharpen = FACTOR_FOR_UNSHARPEN;
#endif
namespace basegfx
diff --git a/basegfx/source/raster/rasterconvert3d.cxx b/basegfx/source/raster/rasterconvert3d.cxx
index d6169b7ad9fe..2e654831c5f3 100644
--- a/basegfx/source/raster/rasterconvert3d.cxx
+++ b/basegfx/source/raster/rasterconvert3d.cxx
@@ -214,9 +214,8 @@ namespace basegfx
B3DPoint aStart(rLine.getB3DPoint(nA));
B3DPoint aEnd(rLine.getB3DPoint(nB));
const double fZBufferLineAdd(0x00ff);
- static bool bForceToPolygon(false);
- if(nLineWidth > 1 || bForceToPolygon)
+ if(nLineWidth > 1)
{
// this is not a hairline anymore, in most cases since it's an oversampled
// hairline to get e.g. AA for Z-Buffering. Create fill geometry.
diff --git a/basegfx/test/B2DHomMatrixTest.cxx b/basegfx/test/B2DHomMatrixTest.cxx
index bf46026beaba..52ab3e77ad5e 100644
--- a/basegfx/test/B2DHomMatrixTest.cxx
+++ b/basegfx/test/B2DHomMatrixTest.cxx
@@ -331,10 +331,10 @@ public:
// using the decompose result should be the same as before. Test
// with all ranges of values. Translations are not tested since these
// are just the two rightmost values and uncritical
- static double fSX(10.0);
- static double fSY(12.0);
- static double fR(F_PI4);
- static double fS(deg2rad(15.0));
+ static const double fSX(10.0);
+ static const double fSY(12.0);
+ static const double fR(F_PI4);
+ static const double fS(deg2rad(15.0));
// check all possible scaling combinations
CPPUNIT_ASSERT_MESSAGE("decompose: error test A1",