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/attribute-rel-util.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/attribute-rel-util.cpp')
| -rw-r--r-- | src/attribute-rel-util.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/attribute-rel-util.cpp b/src/attribute-rel-util.cpp index d0efe0234..7b727ea14 100644 --- a/src/attribute-rel-util.cpp +++ b/src/attribute-rel-util.cpp @@ -129,9 +129,8 @@ void sp_attribute_clean_element(Node *repr, unsigned int flags) { } // Do actual deleting (done after so as not to perturb List iterator). - for( std::set<Glib::ustring>::const_iterator iter_d = attributesToDelete.begin(); - iter_d != attributesToDelete.end(); ++iter_d ) { - repr->setAttribute( (*iter_d).c_str(), nullptr, false ); + for(const auto & iter_d : attributesToDelete) { + repr->setAttribute( iter_d.c_str(), nullptr, false ); } } @@ -268,8 +267,8 @@ void sp_attribute_clean_style(Node* repr, SPCSSAttr *css, unsigned int flags) { } // End loop over style properties // Delete unneeded style properties. Do this at the end so as to not perturb List iterator. - for( std::set<Glib::ustring>::const_iterator iter_d = toDelete.begin(); iter_d != toDelete.end(); ++iter_d ) { - sp_repr_css_set_property( css, (*iter_d).c_str(), nullptr ); + for(const auto & iter_d : toDelete) { + sp_repr_css_set_property( css, iter_d.c_str(), nullptr ); } } @@ -304,8 +303,8 @@ void sp_attribute_purge_default_style(SPCSSAttr *css, unsigned int flags) { } // End loop over style properties // Delete unneeded style properties. Do this at the end so as to not perturb List iterator. - for( std::set<Glib::ustring>::const_iterator iter_d = toDelete.begin(); iter_d != toDelete.end(); ++iter_d ) { - sp_repr_css_set_property( css, (*iter_d).c_str(), nullptr ); + for(const auto & iter_d : toDelete) { + sp_repr_css_set_property( css, iter_d.c_str(), nullptr ); } } |
