summaryrefslogtreecommitdiffstats
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
parentdropped unused variables (diff)
downloadinkscape-2c2601527cd6082e53cee79c0feb99e703c0b220.tar.gz
inkscape-2c2601527cd6082e53cee79c0feb99e703c0b220.zip
cppcheck: initialisation and warning cleanup
(bzr r10744)
-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
-rw-r--r--src/ui/dialog/filedialogimpl-gtkmm.h2
-rw-r--r--src/ui/dialog/filter-effects-dialog.cpp3
-rw-r--r--src/ui/dialog/scriptdialog.cpp4
7 files changed, 40 insertions, 27 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);
-
-
-
};
diff --git a/src/ui/dialog/filedialogimpl-gtkmm.h b/src/ui/dialog/filedialogimpl-gtkmm.h
index e6e771f1b..ba61d618f 100644
--- a/src/ui/dialog/filedialogimpl-gtkmm.h
+++ b/src/ui/dialog/filedialogimpl-gtkmm.h
@@ -79,7 +79,7 @@ findExpanderWidgets(Gtk::Container *parent,
class FileType
{
public:
- FileType() {}
+ FileType(): name(), pattern(),extension(0) {}
~FileType() {}
Glib::ustring name;
Glib::ustring pattern;
diff --git a/src/ui/dialog/filter-effects-dialog.cpp b/src/ui/dialog/filter-effects-dialog.cpp
index 22d3c7369..f5a5041e2 100644
--- a/src/ui/dialog/filter-effects-dialog.cpp
+++ b/src/ui/dialog/filter-effects-dialog.cpp
@@ -1379,7 +1379,8 @@ void FilterEffectsDialog::FilterModifier::rename_filter()
FilterEffectsDialog::CellRendererConnection::CellRendererConnection()
: Glib::ObjectBase(typeid(CellRendererConnection)),
- _primitive(*this, "primitive", 0)
+ _primitive(*this, "primitive", 0),
+ _text_width(0)
{}
Glib::PropertyProxy<void*> FilterEffectsDialog::CellRendererConnection::property_primitive()
diff --git a/src/ui/dialog/scriptdialog.cpp b/src/ui/dialog/scriptdialog.cpp
index ef65dce97..b775c74a1 100644
--- a/src/ui/dialog/scriptdialog.cpp
+++ b/src/ui/dialog/scriptdialog.cpp
@@ -152,9 +152,7 @@ void ScriptDialogImpl::clear()
/**
* Execute the script in the dialog
*/
-void
-ScriptDialogImpl::execute(Inkscape::Extension::Script::InkscapeScript::ScriptLanguage
-lang)
+void ScriptDialogImpl::execute(Inkscape::Extension::Script::InkscapeScript::ScriptLanguage lang)
{
Glib::ustring script = scriptText.get_buffer()->get_text(true);
Glib::ustring output;