diff options
author | Tobias Markmann <tm@ayena.de> | 2016-11-23 07:09:39 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2016-11-23 11:30:02 (GMT) |
commit | e405ff3561be3d3c0bd79d7d5173923a8828cf02 (patch) | |
tree | 9118ef838ebfaec1df90ec24761944b5d833774c /Swiften/Roster/XMPPRosterImpl.cpp | |
parent | 8a71b91be885652f37c5aab5e1ecf25af4599fbc (diff) | |
download | swift-e405ff3561be3d3c0bd79d7d5173923a8828cf02.zip swift-e405ff3561be3d3c0bd79d7d5173923a8828cf02.tar.bz2 |
Migrate remaining Swiften/Base/foreach.h use to range-based for loop
Test-Information:
Build on macOS 10.12.1 and all tests pass.
Change-Id: Iedaa3fa7e7672c77909fd0568bf30e9393cb87e0
Diffstat (limited to 'Swiften/Roster/XMPPRosterImpl.cpp')
-rw-r--r-- | Swiften/Roster/XMPPRosterImpl.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Swiften/Roster/XMPPRosterImpl.cpp b/Swiften/Roster/XMPPRosterImpl.cpp index 9a2ea7a..74f634f 100644 --- a/Swiften/Roster/XMPPRosterImpl.cpp +++ b/Swiften/Roster/XMPPRosterImpl.cpp @@ -1,13 +1,11 @@ /* - * Copyright (c) 2010-2015 Isode Limited. + * Copyright (c) 2010-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #include <Swiften/Roster/XMPPRosterImpl.h> -#include <Swiften/Base/foreach.h> - namespace Swift { XMPPRosterImpl::XMPPRosterImpl() { @@ -78,7 +76,7 @@ RosterItemPayload::Subscription XMPPRosterImpl::getSubscriptionStateForJID(const std::vector<XMPPRosterItem> XMPPRosterImpl::getItems() const { std::vector<XMPPRosterItem> result; - foreach(const RosterMap::value_type& entry, entries_) { + for (const auto& entry : entries_) { result.push_back(entry.second); } return result; @@ -96,7 +94,7 @@ boost::optional<XMPPRosterItem> XMPPRosterImpl::getItem(const JID& jid) const { std::set<std::string> XMPPRosterImpl::getGroups() const { std::set<std::string> result; - foreach(const RosterMap::value_type& entry, entries_) { + for (const auto& entry : entries_) { std::vector<std::string> groups = entry.second.getGroups(); result.insert(groups.begin(), groups.end()); } |