diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2019-01-02 09:41:30 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marc@jeanmougin.fr> | 2019-01-02 09:41:30 +0000 |
| commit | 169dff19d4da8d76e69b8e896aa25b0013639c03 (patch) | |
| tree | a0c070fa95188b5cde708ac285e6a2db9df4a83f /src/ui/dialog/transformation.cpp | |
| parent | Avoid creating a new document before opening an old document. (diff) | |
| download | inkscape-169dff19d4da8d76e69b8e896aa25b0013639c03.tar.gz inkscape-169dff19d4da8d76e69b8e896aa25b0013639c03.zip | |
modernize loops
Diffstat (limited to 'src/ui/dialog/transformation.cpp')
| -rw-r--r-- | src/ui/dialog/transformation.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/ui/dialog/transformation.cpp b/src/ui/dialog/transformation.cpp index 7edacc4ce..50631a16b 100644 --- a/src/ui/dialog/transformation.cpp +++ b/src/ui/dialog/transformation.cpp @@ -655,12 +655,9 @@ void Transformation::applyPageMove(Inkscape::Selection *selection) if (fabs(x) > 1e-6) { std::vector< BBoxSort > sorted; - for (std::vector<SPItem*>::iterator it(selected.begin()); - it != selected.end(); - ++it) + for (auto item : selected) { - SPItem* item = *it; - Geom::OptRect bbox = item->desktopPreferredBounds(); + Geom::OptRect bbox = item->desktopPreferredBounds(); if (bbox) { sorted.emplace_back(item, *bbox, Geom::X, x > 0? 1. : 0., x > 0? 0. : 1.); } @@ -680,12 +677,9 @@ void Transformation::applyPageMove(Inkscape::Selection *selection) } if (fabs(y) > 1e-6) { std::vector< BBoxSort > sorted; - for (std::vector<SPItem*>::iterator it(selected.begin()); - it != selected.end(); - ++it) + for (auto item : selected) { - SPItem* item = *it; - Geom::OptRect bbox = item->desktopPreferredBounds(); + Geom::OptRect bbox = item->desktopPreferredBounds(); if (bbox) { sorted.emplace_back(item, *bbox, Geom::Y, y > 0? 1. : 0., y > 0? 0. : 1.); } |
