From 169dff19d4da8d76e69b8e896aa25b0013639c03 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Wed, 2 Jan 2019 10:41:30 +0100 Subject: modernize loops --- src/object/color-profile.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/object/color-profile.cpp') diff --git a/src/object/color-profile.cpp b/src/object/color-profile.cpp index 9cfac23cf..9b7d25d98 100644 --- a/src/object/color-profile.cpp +++ b/src/object/color-profile.cpp @@ -668,9 +668,9 @@ std::vector Inkscape::CMSSystem::getDisplayNames() loadProfiles(); std::vector result; - for ( std::vector::iterator it = knownProfiles.begin(); it != knownProfiles.end(); ++it ) { - if ( it->getClass() == cmsSigDisplayClass && it->getSpace() == cmsSigRgbData ) { - result.push_back( it->getName() ); + for (auto & knownProfile : knownProfiles) { + if ( knownProfile.getClass() == cmsSigDisplayClass && knownProfile.getSpace() == cmsSigRgbData ) { + result.push_back( knownProfile.getName() ); } } std::sort(result.begin(), result.end()); @@ -683,9 +683,9 @@ std::vector Inkscape::CMSSystem::getSoftproofNames() loadProfiles(); std::vector result; - for ( std::vector::iterator it = knownProfiles.begin(); it != knownProfiles.end(); ++it ) { - if ( it->getClass() == cmsSigOutputClass ) { - result.push_back( it->getName() ); + for (auto & knownProfile : knownProfiles) { + if ( knownProfile.getClass() == cmsSigOutputClass ) { + result.push_back( knownProfile.getName() ); } } std::sort(result.begin(), result.end()); @@ -698,9 +698,9 @@ Glib::ustring Inkscape::CMSSystem::getPathForProfile(Glib::ustring const& name) loadProfiles(); Glib::ustring result; - for ( std::vector::iterator it = knownProfiles.begin(); it != knownProfiles.end(); ++it ) { - if ( name == it->getName() ) { - result = it->getPath(); + for (auto & knownProfile : knownProfiles) { + if ( name == knownProfile.getName() ) { + result = knownProfile.getPath(); break; } } -- cgit v1.2.3