diff options
| author | Kris De Gussem <kris.degussem@gmail.com> | 2012-02-29 20:15:53 +0000 |
|---|---|---|
| committer | Kris <Kris.De.Gussem@hotmail.com> | 2012-02-29 20:15:53 +0000 |
| commit | f2aa7dc620e01b4663622f1862f05768ec633f41 (patch) | |
| tree | b1bb2611f959d45b239b1c5d0384a1f36fa8a23d /src | |
| parent | Fix glibmm 2.28 check and guard against inclusion of deprecated gtk headers (diff) | |
| download | inkscape-f2aa7dc620e01b4663622f1862f05768ec633f41.tar.gz inkscape-f2aa7dc620e01b4663622f1862f05768ec633f41.zip | |
cppcheck
added todo warning for sp-conn-end (after devmail message)
(bzr r11033)
Diffstat (limited to 'src')
| -rw-r--r-- | src/extension/internal/pov-out.cpp | 12 | ||||
| -rw-r--r-- | src/extension/internal/pov-out.h | 2 | ||||
| -rw-r--r-- | src/extension/param/notebook.cpp | 2 | ||||
| -rw-r--r-- | src/extension/patheffect.cpp | 2 | ||||
| -rw-r--r-- | src/extension/system.cpp | 1 | ||||
| -rw-r--r-- | src/live_effects/lpe-recursiveskeleton.cpp | 2 | ||||
| -rw-r--r-- | src/sp-conn-end.cpp | 2 | ||||
| -rw-r--r-- | src/ui/dialog/object-properties.cpp | 4 | ||||
| -rw-r--r-- | src/ui/dialog/text-edit.cpp | 2 |
9 files changed, 20 insertions, 9 deletions
diff --git a/src/extension/internal/pov-out.cpp b/src/extension/internal/pov-out.cpp index d501777b5..3d149928f 100644 --- a/src/extension/internal/pov-out.cpp +++ b/src/extension/internal/pov-out.cpp @@ -95,6 +95,18 @@ static double effective_opacity(SPItem const *item) //# OUTPUT FORMATTING //######################################################################## +PovOutput::PovOutput() : + outbuf (), + nrNodes (0), + nrSegments (0), + nrShapes (0), + idIndex (0), + minx (0), + miny (0), + maxx (0), + maxy (0) +{ +} /** * We want to control floating output format diff --git a/src/extension/internal/pov-out.h b/src/extension/internal/pov-out.h index 0c3b73a7f..2381a974c 100644 --- a/src/extension/internal/pov-out.h +++ b/src/extension/internal/pov-out.h @@ -42,6 +42,8 @@ class PovOutput : public Inkscape::Extension::Implementation::Implementation public: + PovOutput(); + /** * Our internal String definition */ diff --git a/src/extension/param/notebook.cpp b/src/extension/param/notebook.cpp index 6bb3cda80..b1ca359cd 100644 --- a/src/extension/param/notebook.cpp +++ b/src/extension/param/notebook.cpp @@ -141,7 +141,6 @@ ParamNotebookPage::makepage (Inkscape::XML::Node * in_repr, Inkscape::Extension: const char * desc; const char * scope_str; Parameter::_scope_t scope = Parameter::SCOPE_USER; - bool gui_hidden = false; const char * gui_hide; const char * gui_tip; @@ -160,7 +159,6 @@ ParamNotebookPage::makepage (Inkscape::XML::Node * in_repr, Inkscape::Extension: if (gui_hide != NULL) { if (strcmp(gui_hide, "1") == 0 || strcmp(gui_hide, "true") == 0) { - gui_hidden = true; } /* else stays false */ } diff --git a/src/extension/patheffect.cpp b/src/extension/patheffect.cpp index a3094d536..bedab7fd8 100644 --- a/src/extension/patheffect.cpp +++ b/src/extension/patheffect.cpp @@ -44,7 +44,7 @@ PathEffect::processPathEffects (SPDocument * doc, Inkscape::XML::Node * path) gchar ** patheffects = g_strsplit(patheffectlist, ";", 128); Inkscape::XML::Node * defs = doc->getDefs()->getRepr(); - for (int i = 0; patheffects[i] != NULL && i < 128; i++) { + for (int i = 0; (i < 128) && (patheffects[i] != NULL); i++) { gchar * patheffect = patheffects[i]; // This is weird, they should all be references... but anyway diff --git a/src/extension/system.cpp b/src/extension/system.cpp index 82d0a726f..a959913f6 100644 --- a/src/extension/system.cpp +++ b/src/extension/system.cpp @@ -219,7 +219,6 @@ save(Extension *key, SPDocument *doc, gchar const *filename, bool setextension, if (!dynamic_cast<Output *>(omod)) { g_warning("Unable to find output module to handle file: %s\n", filename); throw Output::no_extension_found(); - return; } omod->set_state(Extension::STATE_LOADED); diff --git a/src/live_effects/lpe-recursiveskeleton.cpp b/src/live_effects/lpe-recursiveskeleton.cpp index ac8c112d6..c1cc47d7f 100644 --- a/src/live_effects/lpe-recursiveskeleton.cpp +++ b/src/live_effects/lpe-recursiveskeleton.cpp @@ -64,11 +64,9 @@ LPERecursiveSkeleton::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > co x0 -= pattBndsX->min(); y0 -= pattBndsY->middle(); - double xspace = 0;//spacing; double noffset = 0;//normal_offset; double toffset = 0;//tang_offset; if (false /*prop_units.get_value()*/){ - xspace *= pattBndsX->extent(); noffset *= pattBndsY->extent(); toffset *= pattBndsX->extent(); } diff --git a/src/sp-conn-end.cpp b/src/sp-conn-end.cpp index 80a1cce33..f8d5694da 100644 --- a/src/sp-conn-end.cpp +++ b/src/sp-conn-end.cpp @@ -74,6 +74,8 @@ static bool try_get_intersect_point_with_item_recursive(Geom::PathVector& conn_p const Geom::PathVector& curve_pv = item_curve->get_pathvector(); Geom::CrossingSet cross = crossings(conn_pv, curve_pv); // iterate over all Crossings + //TODO: check correctness of the following code: inner loop uses loop variable + // with a name identical to the loop variable of the outer loop. Then rename. for (Geom::CrossingSet::const_iterator i = cross.begin(); i != cross.end(); ++i) { const Geom::Crossings& cr = *i; diff --git a/src/ui/dialog/object-properties.cpp b/src/ui/dialog/object-properties.cpp index 58e39d522..13d80e301 100644 --- a/src/ui/dialog/object-properties.cpp +++ b/src/ui/dialog/object-properties.cpp @@ -241,7 +241,7 @@ void ObjectProperties::widget_setup(void) LabelLabel.set_text (_("Ref")); } else { - SPObject *obj = (SPObject*)item; + SPObject *obj = static_cast<SPObject*>(item); /* ID */ EntryID.set_text (obj->getId()); @@ -324,7 +324,7 @@ void ObjectProperties::label_changed(void) /* Give feedback on success of setting the drawing object's label * using the widget's label text */ - SPObject *obj = (SPObject*)item; + SPObject *obj = static_cast<SPObject*>(item); if (label.compare (obj->defaultLabel())) { obj->setLabel(label.c_str()); DocumentUndo::done(SP_ACTIVE_DOCUMENT, SP_VERB_DIALOG_ITEM, diff --git a/src/ui/dialog/text-edit.cpp b/src/ui/dialog/text-edit.cpp index bb634197c..1a9c7e99f 100644 --- a/src/ui/dialog/text-edit.cpp +++ b/src/ui/dialog/text-edit.cpp @@ -646,7 +646,7 @@ void TextEdit::onToggle() void TextEdit::onLineSpacingChange(GtkComboBox* widget, gpointer data) { - TextEdit *self = (TextEdit *)data; + TextEdit *self = static_cast<TextEdit *>(data); if (!self || self->blocked) return; |
