From ca82069f0f522c9ef895fb856217ad5c58ae8089 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Wed, 28 Oct 2015 22:15:13 +0100 Subject: Deploy range based for loops. --- plugingui/directory.cc | 8 ++++---- plugingui/listboxbasic.cc | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/plugingui/directory.cc b/plugingui/directory.cc index 8249a82..80eef3f 100644 --- a/plugingui/directory.cc +++ b/plugingui/directory.cc @@ -254,14 +254,14 @@ Directory::EntryList Directory::listFiles(std::string path, unsigned char filter } - for(auto it = directories.begin(); it != directories.end(); ++it) + for(auto directory : directories) { - entries.push_back(*it); + entries.push_back(directory); } - for(auto it = files.begin(); it != files.end(); ++it) + for(auto file : files) { - entries.push_back(*it); + entries.push_back(file); } diff --git a/plugingui/listboxbasic.cc b/plugingui/listboxbasic.cc index 0bfde4c..d774930 100644 --- a/plugingui/listboxbasic.cc +++ b/plugingui/listboxbasic.cc @@ -74,11 +74,11 @@ void ListBoxBasic::addItem(std::string name, std::string value) addItems(items); } -void ListBoxBasic::addItems(std::vector &is) +void ListBoxBasic::addItems(std::vector &items) { - for(auto i = is.begin(); i != is.end(); ++i) + for(auto item : items) { - items.push_back(*i); + items.push_back(item); } if(selected == -1) -- cgit v1.2.3