summaryrefslogtreecommitdiffstats
path: root/src/ui/toolbar/mesh-toolbar.cpp
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc@jeanmougin.fr>2019-01-02 09:41:30 +0000
committerMarc Jeanmougin <marc@jeanmougin.fr>2019-01-02 09:41:30 +0000
commit169dff19d4da8d76e69b8e896aa25b0013639c03 (patch)
treea0c070fa95188b5cde708ac285e6a2db9df4a83f /src/ui/toolbar/mesh-toolbar.cpp
parentAvoid creating a new document before opening an old document. (diff)
downloadinkscape-169dff19d4da8d76e69b8e896aa25b0013639c03.tar.gz
inkscape-169dff19d4da8d76e69b8e896aa25b0013639c03.zip
modernize loops
Diffstat (limited to 'src/ui/toolbar/mesh-toolbar.cpp')
-rw-r--r--src/ui/toolbar/mesh-toolbar.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/ui/toolbar/mesh-toolbar.cpp b/src/ui/toolbar/mesh-toolbar.cpp
index af0e1e5ea..6dad5a189 100644
--- a/src/ui/toolbar/mesh-toolbar.cpp
+++ b/src/ui/toolbar/mesh-toolbar.cpp
@@ -117,16 +117,16 @@ void ms_read_selection( Inkscape::Selection *selection,
// Read desktop selection, taking into account fill/stroke toggles
std::vector<SPMeshGradient *> meshes = ms_get_dt_selected_gradients( selection );
- for (auto i = meshes.begin(); i != meshes.end(); ++i) {
+ for (auto & meshe : meshes) {
if (first) {
- ms_selected = (*i);
- ms_type = (*i)->type;
+ ms_selected = meshe;
+ ms_type = meshe->type;
first = false;
} else {
- if (ms_selected != (*i)) {
+ if (ms_selected != meshe) {
ms_selected_multi = true;
}
- if (ms_type != (*i)->type) {
+ if (ms_type != meshe->type) {
ms_type_multi = true;
}
}
@@ -261,10 +261,10 @@ static void ms_type_changed( GObject *tbl, int mode )
std::vector<SPMeshGradient *> meshes = ms_get_dt_selected_gradients(selection);
SPMeshType type = (SPMeshType) mode;
- for (auto i = meshes.begin(); i != meshes.end(); ++i) {
- (*i)->type = type;
- (*i)->type_set = true;
- (*i)->updateRepr();
+ for (auto & meshe : meshes) {
+ meshe->type = type;
+ meshe->type_set = true;
+ meshe->updateRepr();
}
if (!meshes.empty() ) {
DocumentUndo::done(desktop->getDocument(), SP_VERB_CONTEXT_MESH,_("Set mesh type"));