diff options
| author | Kris De Gussem <kris.degussem@gmail.com> | 2016-02-22 19:49:03 +0000 |
|---|---|---|
| committer | Kris De Gussem <Kris.De.Gussem@hotmail.com> | 2016-02-22 19:49:03 +0000 |
| commit | e16f1a053c67a8c42172f5186f247f11c3b6e777 (patch) | |
| tree | bfd9a3b5794ad3a3002a41eb41ab84e7acd840f6 /src | |
| parent | Apply from patch from houz (Fixes color profile name mangling) (diff) | |
| download | inkscape-e16f1a053c67a8c42172f5186f247f11c3b6e777.tar.gz inkscape-e16f1a053c67a8c42172f5186f247f11c3b6e777.zip | |
static code analysis
(bzr r14664)
Diffstat (limited to 'src')
| -rw-r--r-- | src/desktop-style.cpp | 2 | ||||
| -rw-r--r-- | src/display/sp-canvas.cpp | 4 | ||||
| -rw-r--r-- | src/ui/tools/mesh-tool.cpp | 6 | ||||
| -rw-r--r-- | src/ui/tools/select-tool.cpp | 10 | ||||
| -rw-r--r-- | src/vanishing-point.cpp | 15 | ||||
| -rw-r--r-- | src/vanishing-point.h | 1 |
6 files changed, 20 insertions, 18 deletions
diff --git a/src/desktop-style.cpp b/src/desktop-style.cpp index 67c0687b7..a81cbdd1f 100644 --- a/src/desktop-style.cpp +++ b/src/desktop-style.cpp @@ -1267,7 +1267,7 @@ objects_query_writing_modes (const std::vector<SPItem*> &objects, SPStyle *style int texts = 0; - for (std::vector<SPItem*>::const_iterator i = objects.begin(); i != objects.end(); i++) { + for (std::vector<SPItem*>::const_iterator i = objects.begin(); i != objects.end(); ++i) { SPObject *obj = *i; if (!isTextualItem(obj)) { diff --git a/src/display/sp-canvas.cpp b/src/display/sp-canvas.cpp index 22765cb9d..ef47613e4 100644 --- a/src/display/sp-canvas.cpp +++ b/src/display/sp-canvas.cpp @@ -607,7 +607,7 @@ void sp_canvas_item_raise(SPCanvasItem *item, int positions) g_assert (l != parent->items.end()); for (int i=0; i<=positions && l != parent->items.end(); ++i) - l++; + ++l; parent->items.remove(item); parent->items.insert(l, item); @@ -656,7 +656,7 @@ void sp_canvas_item_lower(SPCanvasItem *item, int positions) g_assert (l != parent->items.end()); for (int i=0; i<positions && l != parent->items.begin(); ++i) - l--; + ++l; parent->items.remove(item); parent->items.insert(l, item); diff --git a/src/ui/tools/mesh-tool.cpp b/src/ui/tools/mesh-tool.cpp index 7db4e09d8..47927667c 100644 --- a/src/ui/tools/mesh-tool.cpp +++ b/src/ui/tools/mesh-tool.cpp @@ -458,7 +458,7 @@ bool MeshTool::root_handler(GdkEvent* event) { SPCtrlCurve *line = NULL; if (! drag->lines.empty()) { - for (std::vector<SPCtrlLine *>::const_iterator l = drag->lines.begin(); l != drag->lines.end() && (!over_line); l++) { + for (std::vector<SPCtrlLine *>::const_iterator l = drag->lines.begin(); l != drag->lines.end() && (!over_line); ++l) { line = (SPCtrlCurve*) (*l); over_line |= sp_mesh_context_is_over_line (this, (SPItem*) line, Geom::Point(event->motion.x, event->motion.y)); } @@ -594,7 +594,7 @@ bool MeshTool::root_handler(GdkEvent* event) { bool over_line = false; if (!drag->lines.empty()) { - for (std::vector<SPCtrlLine *>::const_iterator l = drag->lines.begin(); l != drag->lines.end() ; l++) { + for (std::vector<SPCtrlLine *>::const_iterator l = drag->lines.begin(); l != drag->lines.end() ; ++l) { over_line |= sp_mesh_context_is_over_line (this, (SPItem*)(*l), Geom::Point(event->motion.x, event->motion.y)); } } @@ -625,7 +625,7 @@ bool MeshTool::root_handler(GdkEvent* event) { SPCtrlLine *line = NULL; if (!drag->lines.empty()) { - for (std::vector<SPCtrlLine *>::const_iterator l = drag->lines.begin(); l != drag->lines.end() && (!over_line); l++) { + for (std::vector<SPCtrlLine *>::const_iterator l = drag->lines.begin(); l != drag->lines.end() && (!over_line); ++l) { line = (SPCtrlLine*)(*l); over_line = sp_mesh_context_is_over_line (this, (SPItem*) line, Geom::Point(event->motion.x, event->motion.y)); diff --git a/src/ui/tools/select-tool.cpp b/src/ui/tools/select-tool.cpp index 2b85216d2..905e38f2b 100644 --- a/src/ui/tools/select-tool.cpp +++ b/src/ui/tools/select-tool.cpp @@ -405,13 +405,15 @@ void SelectTool::sp_select_context_cycle_through_items(Inkscape::Selection *sele // Find next item and activate it std::vector<SPItem *>::iterator next = this->cycling_cur_item; if (scroll_event->direction == GDK_SCROLL_UP) { - next++; - if (next == this->cycling_items.end() && this->cycling_wrap) + ++next; + if (next == this->cycling_items.end() && this->cycling_wrap) { next = this->cycling_items.begin(); + } } else { - if(next == this->cycling_items.begin()) + if(next == this->cycling_items.begin()) { next = this->cycling_items.end(); - next--; + } + --next; } if (next!=this->cycling_items.end()) { diff --git a/src/vanishing-point.cpp b/src/vanishing-point.cpp index 9ce60fce7..32ccbad93 100644 --- a/src/vanishing-point.cpp +++ b/src/vanishing-point.cpp @@ -269,15 +269,14 @@ VanishingPoint::selectedBoxes(Inkscape::Selection *sel) { return sel_boxes; } -VPDragger::VPDragger(VPDrag *parent, Geom::Point p, VanishingPoint &vp) +VPDragger::VPDragger(VPDrag *parent, Geom::Point p, VanishingPoint &vp) : + parent(parent), + knot(NULL), + point(p), + point_original(p), + dragging_started(false), + vps() { - this->parent = parent; - - this->point = p; - this->point_original = p; - - this->dragging_started = false; - if (vp.is_finite()) { // create the knot this->knot = new SPKnot(SP_ACTIVE_DESKTOP, NULL); diff --git a/src/vanishing-point.h b/src/vanishing-point.h index 28da8e7fa..ae2a88d6e 100644 --- a/src/vanishing-point.h +++ b/src/vanishing-point.h @@ -46,6 +46,7 @@ public: inline VanishingPoint &operator=(VanishingPoint const &rhs) { _persp = rhs._persp; _axis = rhs._axis; + my_counter = rhs.my_counter; return *this; } inline bool operator==(VanishingPoint const &rhs) const { |
