diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2013-08-03 20:57:37 +0000 |
|---|---|---|
| committer | Johan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl> | 2013-08-03 20:57:37 +0000 |
| commit | 2580137d7c69ba5752ca7ce698d6cf104ff7f00c (patch) | |
| tree | 0e0625f54a21c0390f5b5ec1415bfcaf0e7c00f4 /src/livarot/Path.cpp | |
| parent | fix initialization (diff) | |
| download | inkscape-2580137d7c69ba5752ca7ce698d6cf104ff7f00c.tar.gz inkscape-2580137d7c69ba5752ca7ce698d6cf104ff7f00c.zip | |
fix small "performance" issues (cppcheck)
(bzr r12461)
Diffstat (limited to '')
| -rw-r--r-- | src/livarot/Path.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/livarot/Path.cpp b/src/livarot/Path.cpp index 88d397864..68891e4aa 100644 --- a/src/livarot/Path.cpp +++ b/src/livarot/Path.cpp @@ -28,7 +28,7 @@ Path::Path() Path::~Path() { - for (std::vector<PathDescr*>::iterator i = descr_cmd.begin(); i != descr_cmd.end(); i++) { + for (std::vector<PathDescr*>::iterator i = descr_cmd.begin(); i != descr_cmd.end(); ++i) { delete *i; } } @@ -37,7 +37,7 @@ Path::~Path() void Path::Affiche() { std::cout << "path: " << descr_cmd.size() << " commands." << std::endl; - for (std::vector<PathDescr*>::const_iterator i = descr_cmd.begin(); i != descr_cmd.end(); i++) { + for (std::vector<PathDescr*>::const_iterator i = descr_cmd.begin(); i != descr_cmd.end(); ++i) { (*i)->dump(std::cout); std::cout << std::endl; } @@ -47,7 +47,7 @@ void Path::Affiche() void Path::Reset() { - for (std::vector<PathDescr*>::iterator i = descr_cmd.begin(); i != descr_cmd.end(); i++) { + for (std::vector<PathDescr*>::iterator i = descr_cmd.begin(); i != descr_cmd.end(); ++i) { delete *i; } @@ -61,7 +61,7 @@ void Path::Copy(Path * who) { ResetPoints(); - for (std::vector<PathDescr*>::iterator i = descr_cmd.begin(); i != descr_cmd.end(); i++) { + for (std::vector<PathDescr*>::iterator i = descr_cmd.begin(); i != descr_cmd.end(); ++i) { delete *i; } @@ -69,7 +69,7 @@ void Path::Copy(Path * who) for (std::vector<PathDescr*>::const_iterator i = who->descr_cmd.begin(); i != who->descr_cmd.end(); - i++) + ++i) { descr_cmd.push_back((*i)->clone()); } @@ -496,9 +496,9 @@ void Path::PolylineBoundingBox(double &l, double &t, double &r, double &b) std::vector<path_lineto>::const_iterator i = pts.begin(); l = r = i->p[Geom::X]; t = b = i->p[Geom::Y]; - i++; + ++i; - for (; i != pts.end(); i++) { + for (; i != pts.end(); ++i) { r = std::max(r, i->p[Geom::X]); l = std::min(l, i->p[Geom::X]); b = std::max(b, i->p[Geom::Y]); @@ -701,7 +701,7 @@ void Path::PointAndTangentAt(int piece, double at, Geom::Point &pos, Geom::Point void Path::Transform(const Geom::Affine &trans) { - for (std::vector<PathDescr*>::iterator i = descr_cmd.begin(); i != descr_cmd.end(); i++) { + for (std::vector<PathDescr*>::iterator i = descr_cmd.begin(); i != descr_cmd.end(); ++i) { (*i)->transform(trans); } } |
