diff options
Diffstat (limited to 'Swift/Controllers/Roster')
-rw-r--r-- | Swift/Controllers/Roster/ContactRosterItem.cpp | 1 | ||||
-rw-r--r-- | Swift/Controllers/Roster/RosterGroupExpandinessPersister.cpp | 3 | ||||
-rw-r--r-- | Swift/Controllers/Roster/TableRoster.cpp | 5 |
3 files changed, 3 insertions, 6 deletions
diff --git a/Swift/Controllers/Roster/ContactRosterItem.cpp b/Swift/Controllers/Roster/ContactRosterItem.cpp index 71c5f8e..8fdf183 100644 --- a/Swift/Controllers/Roster/ContactRosterItem.cpp +++ b/Swift/Controllers/Roster/ContactRosterItem.cpp @@ -9,7 +9,6 @@ #include <boost/date_time/posix_time/posix_time.hpp> #include <Swiften/Base/DateTime.h> -#include <Swiften/Base/foreach.h> #include <Swiften/Elements/Idle.h> #include <Swiften/Elements/Presence.h> diff --git a/Swift/Controllers/Roster/RosterGroupExpandinessPersister.cpp b/Swift/Controllers/Roster/RosterGroupExpandinessPersister.cpp index af89b54..0f07c0b 100644 --- a/Swift/Controllers/Roster/RosterGroupExpandinessPersister.cpp +++ b/Swift/Controllers/Roster/RosterGroupExpandinessPersister.cpp @@ -11,7 +11,6 @@ #include <boost/bind.hpp> #include <Swiften/Base/String.h> -#include <Swiften/Base/foreach.h> #include <Swift/Controllers/Roster/GroupRosterItem.h> #include <Swift/Controllers/SettingConstants.h> @@ -45,7 +44,7 @@ void RosterGroupExpandinessPersister::handleExpandedChanged(GroupRosterItem* gro void RosterGroupExpandinessPersister::save() { std::string setting; - foreach (const std::string& group, collapsed_) { + for (const auto& group : collapsed_) { if (!setting.empty()) { setting += "\n"; } diff --git a/Swift/Controllers/Roster/TableRoster.cpp b/Swift/Controllers/Roster/TableRoster.cpp index f164a4d..713f390 100644 --- a/Swift/Controllers/Roster/TableRoster.cpp +++ b/Swift/Controllers/Roster/TableRoster.cpp @@ -12,7 +12,6 @@ #include <boost/cast.hpp> #include <boost/numeric/conversion/cast.hpp> -#include <Swiften/Base/foreach.h> #include <Swiften/Network/Timer.h> #include <Swiften/Network/TimerFactory.h> @@ -104,11 +103,11 @@ void TableRoster::handleUpdateTimerTick() { // Get a model for the new roster std::vector<Section> newSections; if (model) { - foreach(RosterItem* item, model->getRoot()->getDisplayedChildren()) { + for (auto item : model->getRoot()->getDisplayedChildren()) { if (GroupRosterItem* groupItem = boost::polymorphic_downcast<GroupRosterItem*>(item)) { //std::cerr << "* " << groupItem->getDisplayName() << std::endl; Section section(groupItem->getDisplayName()); - foreach(RosterItem* groupChildItem, groupItem->getDisplayedChildren()) { + for (auto groupChildItem : groupItem->getDisplayedChildren()) { if (ContactRosterItem* contact = boost::polymorphic_downcast<ContactRosterItem*>(groupChildItem)) { //std::cerr << " - " << contact->getDisplayJID() << std::endl; section.items.push_back(Item(contact->getDisplayName(), contact->getStatusText(), contact->getDisplayJID(), contact->getStatusShow(), contact->getAvatarPath())); |