summaryrefslogtreecommitdiffstats
path: root/src/trace
diff options
context:
space:
mode:
authorKris De Gussem <kris.degussem@gmail.com>2011-11-18 15:13:41 +0000
committerKris <Kris.De.Gussem@hotmail.com>2011-11-18 15:13:41 +0000
commit2c2601527cd6082e53cee79c0feb99e703c0b220 (patch)
treed52dd0ec1be2553502ad9c038320f8bad4031407 /src/trace
parentdropped unused variables (diff)
downloadinkscape-2c2601527cd6082e53cee79c0feb99e703c0b220.tar.gz
inkscape-2c2601527cd6082e53cee79c0feb99e703c0b220.zip
cppcheck: initialisation and warning cleanup
(bzr r10744)
Diffstat (limited to 'src/trace')
-rw-r--r--src/trace/potrace/inkscape-potrace.cpp21
-rw-r--r--src/trace/potrace/inkscape-potrace.h2
-rw-r--r--src/trace/siox.cpp22
-rw-r--r--src/trace/siox.h13
4 files changed, 36 insertions, 22 deletions
diff --git a/src/trace/potrace/inkscape-potrace.cpp b/src/trace/potrace/inkscape-potrace.cpp
index 6583fb735..0907573e9 100644
--- a/src/trace/potrace/inkscape-potrace.cpp
+++ b/src/trace/potrace/inkscape-potrace.cpp
@@ -77,20 +77,23 @@ namespace Potrace {
/**
*
*/
-PotraceTracingEngine::PotraceTracingEngine()
+PotraceTracingEngine::PotraceTracingEngine() :
+ keepGoing(1),
+ traceType(TRACE_BRIGHTNESS),
+ invert(false),
+ quantizationNrColors(8),
+ brightnessThreshold(0.45),
+ brightnessFloor(0),
+ cannyHighThreshold(0.65),
+ multiScanNrColors(8),
+ multiScanStack(true),
+ multiScanSmooth(false),
+ multiScanRemoveBackground(false)
{
/* get default parameters */
potraceParams = potrace_param_default();
potraceParams->progress.callback = potraceStatusCallback;
potraceParams->progress.data = (void *)this;
-
- //##### Our defaults
- invert = false;
- traceType = TRACE_BRIGHTNESS;
- quantizationNrColors = 8;
- brightnessThreshold = 0.45;
- cannyHighThreshold = 0.65;
-
}
PotraceTracingEngine::~PotraceTracingEngine()
diff --git a/src/trace/potrace/inkscape-potrace.h b/src/trace/potrace/inkscape-potrace.h
index 5ed0c0e5a..f2fc9a71f 100644
--- a/src/trace/potrace/inkscape-potrace.h
+++ b/src/trace/potrace/inkscape-potrace.h
@@ -245,7 +245,7 @@ class PotraceTracingEngine : public TracingEngine
potrace_param_t *potraceParams;
TraceType traceType;
- //## do i invert at the end?
+ //## do I invert at the end?
bool invert;
//## Color-->b&w quantization
diff --git a/src/trace/siox.cpp b/src/trace/siox.cpp
index e7ef5b0c0..4c6cf1eac 100644
--- a/src/trace/siox.cpp
+++ b/src/trace/siox.cpp
@@ -736,19 +736,33 @@ const float Siox::CERTAIN_BACKGROUND_CONFIDENCE=0.0f;
/**
* Construct a Siox engine
*/
-Siox::Siox()
+Siox::Siox() :
+ sioxObserver(0),
+ keepGoing(true),
+ width(0),
+ height(0),
+ pixelCount(0),
+ image(0),
+ cm(0),
+ labelField(0)
{
- sioxObserver = NULL;
init();
}
/**
* Construct a Siox engine
*/
-Siox::Siox(SioxObserver *observer)
+Siox::Siox(SioxObserver *observer) :
+ sioxObserver(observer),
+ keepGoing(true),
+ width(0),
+ height(0),
+ pixelCount(0),
+ image(0),
+ cm(0),
+ labelField(0)
{
init();
- sioxObserver = observer;
}
diff --git a/src/trace/siox.h b/src/trace/siox.h
index dd7f9422f..9a44ce1cf 100644
--- a/src/trace/siox.h
+++ b/src/trace/siox.h
@@ -508,11 +508,6 @@ private:
bool keepGoing;
/**
- * Our signature limits
- */
- float limits[3];
-
- /**
* Image width
*/
unsigned int width;
@@ -544,6 +539,11 @@ private:
/**
+ * Our signature limits
+ */
+ float limits[3];
+
+ /**
* Maximum distance of two lab values.
*/
float clusterSize;
@@ -649,9 +649,6 @@ private:
*/
float sqrEuclidianDist(float *p, int pSize, float *q);
-
-
-
};