diff --git a/rtengine/profilestore.cc b/rtengine/profilestore.cc index 7c3e94da3..776dd7caa 100644 --- a/rtengine/profilestore.cc +++ b/rtengine/profilestore.cc @@ -264,9 +264,9 @@ bool ProfileStore::parseDir (Glib::ustring& realPath, Glib::ustring& virtualPath int ProfileStore::findFolderId (const Glib::ustring &path) const { // initialization must have been done when calling this - for (std::vector::const_iterator i = folders.begin(); i != folders.end(); ++i) { - if (*i == path) { - return i - folders.begin(); + for (size_t i = 0; i < folders.size(); ++i) { + if (folders[i] == path) { + return i; } } diff --git a/rtgui/profilestorecombobox.cc b/rtgui/profilestorecombobox.cc index 3fd613cb0..ae84bd951 100644 --- a/rtgui/profilestorecombobox.cc +++ b/rtgui/profilestorecombobox.cc @@ -147,7 +147,7 @@ void ProfileStoreComboBox::updateProfileList () Gtk::TreeIter ProfileStoreComboBox::findRowFromEntry_ (Gtk::TreeModel::Children childs, const ProfileStoreEntry *pse) const { - for (const auto iter : childs) { + for (const auto& iter : childs) { const Gtk::TreeModel::Row row = *iter; // Hombre: is there a smarter way of knowing if this row has childs? const ProfileStoreEntry *pse_ = row[methodColumns.profileStoreEntry];