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/inkscape-preferences.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/inkscape-preferences.cpp')
| -rw-r--r-- | src/ui/dialog/inkscape-preferences.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index 2a6cb9ebe..e2be3d431 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -1385,9 +1385,9 @@ void InkscapePreferences::initPageIO() gint index = 0; _cms_display_profile.append(_("<none>")); index++; - for ( std::vector<Glib::ustring>::iterator it = names.begin(); it != names.end(); ++it ) { - _cms_display_profile.append( *it ); - Glib::ustring path = CMSSystem::getPathForProfile(*it); + for (auto & name : names) { + _cms_display_profile.append( name ); + Glib::ustring path = CMSSystem::getPathForProfile(name); if ( !path.empty() && path == current ) { _cms_display_profile.set_active(index); } @@ -1400,9 +1400,9 @@ void InkscapePreferences::initPageIO() names = ::Inkscape::CMSSystem::getSoftproofNames(); current = prefs->getString("/options/softproof/uri"); index = 0; - for ( std::vector<Glib::ustring>::iterator it = names.begin(); it != names.end(); ++it ) { - _cms_proof_profile.append( *it ); - Glib::ustring path = CMSSystem::getPathForProfile(*it); + for (auto & name : names) { + _cms_proof_profile.append( name ); + Glib::ustring path = CMSSystem::getPathForProfile(name); if ( !path.empty() && path == current ) { _cms_proof_profile.set_active(index); } @@ -2114,9 +2114,8 @@ void InkscapePreferences::onKBListKeyboardShortcuts() std::vector<Verb *>verbs = Inkscape::Verb::getList(); - for (unsigned int i = 0; i < verbs.size(); i++) { + for (auto verb : verbs) { - Inkscape::Verb* verb = verbs[i]; if (!verb) { continue; } |
