summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKris De Gussem <kris.degussem@gmail.com>2013-10-16 19:47:12 +0000
committerKris <Kris.De.Gussem@hotmail.com>2013-10-16 19:47:12 +0000
commitaf8374a9745905bde55e5b19425bf95b2fd3f935 (patch)
treefe0f4cc183027fa595b61b69275c69e2d2af8142 /src
parentFix colour variable type with gtkmm 3 (diff)
downloadinkscape-af8374a9745905bde55e5b19425bf95b2fd3f935.tar.gz
inkscape-af8374a9745905bde55e5b19425bf95b2fd3f935.zip
static code analysis: performance
(bzr r12695)
Diffstat (limited to 'src')
-rw-r--r--src/desktop.cpp2
-rw-r--r--src/flood-context.cpp2
-rw-r--r--src/gradient-drag.cpp2
-rw-r--r--src/libcola/cola.cpp2
-rw-r--r--src/libcola/straightener.cpp2
-rw-r--r--src/libvpsc/constraint.cpp4
-rw-r--r--src/seltrans.cpp2
7 files changed, 8 insertions, 8 deletions
diff --git a/src/desktop.cpp b/src/desktop.cpp
index dbad37b92..f5c35514c 100644
--- a/src/desktop.cpp
+++ b/src/desktop.cpp
@@ -1930,7 +1930,7 @@ SPDesktop::show_dialogs()
mapVerbPreference.insert(std::make_pair ("SpellCheck", "/dialogs/spellcheck") );
mapVerbPreference.insert(std::make_pair ("Symbols", "/dialogs/symbols") );
- for (std::map<Glib::ustring, Glib::ustring>::const_iterator iter = mapVerbPreference.begin(); iter != mapVerbPreference.end(); iter++) {
+ for (std::map<Glib::ustring, Glib::ustring>::const_iterator iter = mapVerbPreference.begin(); iter != mapVerbPreference.end(); ++iter) {
Glib::ustring pref = iter->second;
int visible = prefs->getInt(pref + "/visible", 0);
if (visible) {
diff --git a/src/flood-context.cpp b/src/flood-context.cpp
index 28aedba6e..dc89fb0a9 100644
--- a/src/flood-context.cpp
+++ b/src/flood-context.cpp
@@ -955,7 +955,7 @@ static void sp_flood_do_flood_fill(SPEventContext *event_context, GdkEvent *even
unsigned int sort_y = (unsigned int)cp[Geom::Y];
unsigned int current_y = sort_y;
- for (std::deque<Geom::Point>::iterator i = fill_queue.begin(); i != fill_queue.end(); i++) {
+ for (std::deque<Geom::Point>::iterator i = fill_queue.begin(); i != fill_queue.end(); ++i) {
Geom::Point current = *i;
current_y = (unsigned int)current[Geom::Y];
if (current_y != sort_y) {
diff --git a/src/gradient-drag.cpp b/src/gradient-drag.cpp
index b3622107b..0b250fe52 100644
--- a/src/gradient-drag.cpp
+++ b/src/gradient-drag.cpp
@@ -879,7 +879,7 @@ static void gr_knot_moved_handler(SPKnot *knot, Geom::Point const &ppointer, gui
if (!bsp.getSnapped()) {
// If we didn't truly snap to an object or to a grid, then we will still have to look for the
// closest projection onto one of the constraints. findBestSnap() will not do this for us
- for (std::list<Inkscape::SnappedPoint>::const_iterator i = isr.points.begin(); i != isr.points.end(); i++) {
+ for (std::list<Inkscape::SnappedPoint>::const_iterator i = isr.points.begin(); i != isr.points.end(); ++i) {
if (i == isr.points.begin() || (Geom::L2((*i).getPoint() - p) < Geom::L2(bsp.getPoint() - p))) {
bsp.setPoint((*i).getPoint());
bsp.setTarget(Inkscape::SNAPTARGET_CONSTRAINED_ANGLE);
diff --git a/src/libcola/cola.cpp b/src/libcola/cola.cpp
index 87fbf9f79..51560a79c 100644
--- a/src/libcola/cola.cpp
+++ b/src/libcola/cola.cpp
@@ -271,7 +271,7 @@ void ConstrainedMajorizationLayout::straighten(std::vector<straightener::Edge*>&
double b[n],*coords=dim==HORIZONTAL?X:Y,dist_ub,dist_bv;
std::fill(b,b+n,0);
for(LinearConstraints::iterator i=linearConstraints.begin();
- i!= linearConstraints.end();i++) {
+ i!= linearConstraints.end();++i) {
LinearConstraint* c=*i;
if(straightenToProjection) {
Q[c->u][c->u]+=c->w*c->duu;
diff --git a/src/libcola/straightener.cpp b/src/libcola/straightener.cpp
index fab30d48d..9e1ab1809 100644
--- a/src/libcola/straightener.cpp
+++ b/src/libcola/straightener.cpp
@@ -82,7 +82,7 @@ namespace straightener {
double bx=route->xs[i];
double by=route->ys[i];
double t=0;
- list<unsigned>::iterator copyit=j++;
+ list<unsigned>::iterator copyit=++j;
//printf(" px=%f, py=%f, ax=%f, ay=%f, bx=%f, by=%f\n",px,py,ax,ay,bx,by);
if(pointOnLine(px,py,ax,ay,bx,by,t)) {
//printf(" got node %d\n",*copyit);
diff --git a/src/libvpsc/constraint.cpp b/src/libvpsc/constraint.cpp
index 2bd173155..0ec06dfac 100644
--- a/src/libvpsc/constraint.cpp
+++ b/src/libvpsc/constraint.cpp
@@ -24,11 +24,11 @@ Constraint::Constraint(Variable *left, Variable *right, double gap, bool equalit
}
Constraint::~Constraint() {
Constraints::iterator i;
- for(i=left->out.begin(); i!=left->out.end(); i++) {
+ for(i=left->out.begin(); i!=left->out.end(); ++i) {
if(*i==this) break;
}
left->out.erase(i);
- for(i=right->in.begin(); i!=right->in.end(); i++) {
+ for(i=right->in.begin(); i!=right->in.end(); ++i) {
if(*i==this) break;
}
right->in.erase(i);
diff --git a/src/seltrans.cpp b/src/seltrans.cpp
index 7a8f5ec17..ed0fd3a08 100644
--- a/src/seltrans.cpp
+++ b/src/seltrans.cpp
@@ -1394,7 +1394,7 @@ void Inkscape::SelTrans::moveTo(Geom::Point const &xy, guint state)
/* Pick one */
Inkscape::SnappedPoint best_snapped_point;
- for (std::list<Inkscape::SnappedPoint>::const_iterator i = s.begin(); i != s.end(); i++) {
+ for (std::list<Inkscape::SnappedPoint>::const_iterator i = s.begin(); i != s.end(); ++i) {
if (i->getSnapped()) {
if (best_snapped_point.isOtherSnapBetter(*i, true)) {
best_snapped_point = *i;