diff options
| author | Kris De Gussem <kris.degussem@gmail.com> | 2012-06-12 19:42:58 +0000 |
|---|---|---|
| committer | Kris <Kris.De.Gussem@hotmail.com> | 2012-06-12 19:42:58 +0000 |
| commit | ed4d7f8b668ebf280ef2a29badc6999c9c145ce0 (patch) | |
| tree | bb5a75ff7f18249e0c75504053f96ea7e4f720b6 | |
| parent | enable GSEAL for Windows builds (diff) | |
| download | inkscape-ed4d7f8b668ebf280ef2a29badc6999c9c145ce0.tar.gz inkscape-ed4d7f8b668ebf280ef2a29badc6999c9c145ce0.zip | |
cppcheck
(bzr r11492)
| -rw-r--r-- | src/snap.cpp | 1 | ||||
| -rw-r--r-- | src/snapper.h | 8 | ||||
| -rw-r--r-- | src/sp-gradient.h | 21 | ||||
| -rw-r--r-- | src/sp-mesh-array.cpp | 4 | ||||
| -rw-r--r-- | src/ui/dialog/filedialogimpl-gtkmm.cpp | 2 |
5 files changed, 21 insertions, 15 deletions
diff --git a/src/snap.cpp b/src/snap.cpp index e059bbe13..1ee55fcf8 100644 --- a/src/snap.cpp +++ b/src/snap.cpp @@ -46,6 +46,7 @@ SnapManager::SnapManager(SPNamedView const *v) : _rotation_center_source_items(NULL), _guide_to_ignore(NULL), _desktop(NULL), + _snapindicator(true), _unselected_nodes(NULL) { } diff --git a/src/snapper.h b/src/snapper.h index 78d32c12c..d9f3ab797 100644 --- a/src/snapper.h +++ b/src/snapper.h @@ -75,14 +75,14 @@ public: public: // Constructs a direction constraint, e.g. horizontal or vertical but without a specified point - SnapConstraint(Geom::Point const &d) : _direction(d), _type(DIRECTION) {} + SnapConstraint(Geom::Point const &d) : _point(), _direction(d), _radius(0), _type(DIRECTION) {} // Constructs a linear constraint - SnapConstraint(Geom::Point const &p, Geom::Point const &d) : _point(p), _direction(d), _type(LINE) {} - SnapConstraint(Geom::Line const &l) : _point(l.origin()), _direction(l.versor()), _type(LINE) {} + SnapConstraint(Geom::Point const &p, Geom::Point const &d) : _point(p), _direction(d), _radius(0), _type(LINE) {} + SnapConstraint(Geom::Line const &l) : _point(l.origin()), _direction(l.versor()), _radius(0), _type(LINE) {} // Constructs a circular constraint SnapConstraint(Geom::Point const &p, Geom::Point const &d, Geom::Coord const &r) : _point(p), _direction(d), _radius(r), _type(CIRCLE) {} // Undefined, or empty constraint - SnapConstraint() : _type(UNDEFINED) {} + SnapConstraint() : _point(), _direction(), _radius(0), _type(UNDEFINED) {} bool hasPoint() const {return _type != DIRECTION && _type != UNDEFINED;} diff --git a/src/sp-gradient.h b/src/sp-gradient.h index ba9c32d17..b55e95a41 100644 --- a/src/sp-gradient.h +++ b/src/sp-gradient.h @@ -94,14 +94,7 @@ std::vector<PaintTarget> const &allPaintTargets(); * Implement spread, stops list * \todo fixme: Implement more here (Lauris) */ -struct SPGradient : public SPPaintServer { - - /** Reference (href) */ - SPGradientReference *ref; - - /** State in Inkscape gradient system */ - guint state : 2; - +class SPGradient : public SPPaintServer { private: /** gradientUnits attribute */ SPGradientUnits units; @@ -124,7 +117,19 @@ private: guint has_patches : 1; public: + SPGradient() : + units(), + spread(), + ref(NULL), + vector() + {} + + /** Reference (href) */ + SPGradientReference *ref; + /** State in Inkscape gradient system */ + guint state : 2; + /** Linear and Radial Gradients */ /** Composed vector */ diff --git a/src/sp-mesh-array.cpp b/src/sp-mesh-array.cpp index ce87e8aff..a3d06b30e 100644 --- a/src/sp-mesh-array.cpp +++ b/src/sp-mesh-array.cpp @@ -1026,7 +1026,7 @@ void SPMeshNodeArray::create( SPMeshGradient *mg, SPItem *item, Geom::OptRect bb // We get called twice when a new mesh is created...WHY? // return if we've already constructed the mesh. - if( nodes.size() != 0 ) return; + if( !nodes.empty() ) return; // Get default color SPColor color = default_color( item ); @@ -2339,7 +2339,7 @@ void SPMeshNodeArray::split_row( guint row, double coord ) { } else { // We are splitting a middle - bool set = nodes[i+1][j]->set || nodes[i+1][j]->set; + bool set = nodes[i+1][j]->set;// || nodes[i+1][j]->set; //TODO: bug here? was same on left and right hand side of || nodes[i+4][j]->set = set; nodes[i+5][j]->set = set; nodes[i+4][j]->node_type = MG_NODE_TYPE_TENSOR; diff --git a/src/ui/dialog/filedialogimpl-gtkmm.cpp b/src/ui/dialog/filedialogimpl-gtkmm.cpp index b14da08be..d1a3167a6 100644 --- a/src/ui/dialog/filedialogimpl-gtkmm.cpp +++ b/src/ui/dialog/filedialogimpl-gtkmm.cpp @@ -946,7 +946,7 @@ std::vector<Glib::ustring>FileOpenDialogImplGtk::getFilenames() std::vector<Glib::ustring> result; for (std::vector<std::string>::iterator it = result_tmp.begin(); - it != result_tmp.end(); it++) + it != result_tmp.end(); ++it) result.push_back(*it); #else |
