summaryrefslogtreecommitdiffstats
path: root/basegfx/source
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/source
parenttdf#45904 Move XNamed Java tests to C++ (diff)
downloadcore-5c23459245f566831383934dd64d19e002bfcfcb.tar.gz
core-5c23459245f566831383934dd64d19e002bfcfcb.zip
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/source')
-rw-r--r--basegfx/source/curve/b2dcubicbezier.cxx2
-rw-r--r--basegfx/source/raster/rasterconvert3d.cxx3
2 files changed, 2 insertions, 3 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.