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 /Swift/Controllers/Storages | |
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 'Swift/Controllers/Storages')
-rw-r--r-- | Swift/Controllers/Storages/AvatarFileStorage.cpp | 1 | ||||
-rw-r--r-- | Swift/Controllers/Storages/CertificateMemoryStorage.cpp | 6 | ||||
-rw-r--r-- | Swift/Controllers/Storages/VCardFileStorage.cpp | 1 |
3 files changed, 2 insertions, 6 deletions
diff --git a/Swift/Controllers/Storages/AvatarFileStorage.cpp b/Swift/Controllers/Storages/AvatarFileStorage.cpp index cded945..a103920 100644 --- a/Swift/Controllers/Storages/AvatarFileStorage.cpp +++ b/Swift/Controllers/Storages/AvatarFileStorage.cpp @@ -12,7 +12,6 @@ #include <boost/filesystem/fstream.hpp> #include <Swiften/Base/String.h> -#include <Swiften/Base/foreach.h> #include <Swiften/Crypto/CryptoProvider.h> #include <Swiften/StringCodecs/Hexify.h> diff --git a/Swift/Controllers/Storages/CertificateMemoryStorage.cpp b/Swift/Controllers/Storages/CertificateMemoryStorage.cpp index 08c6ee7..545ca65 100644 --- a/Swift/Controllers/Storages/CertificateMemoryStorage.cpp +++ b/Swift/Controllers/Storages/CertificateMemoryStorage.cpp @@ -1,20 +1,18 @@ /* - * Copyright (c) 2011 Isode Limited. + * Copyright (c) 2011-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #include <Swift/Controllers/Storages/CertificateMemoryStorage.h> -#include <Swiften/Base/foreach.h> - using namespace Swift; CertificateMemoryStorage::CertificateMemoryStorage() { } bool CertificateMemoryStorage::hasCertificate(Certificate::ref certificate) const { - foreach(Certificate::ref storedCert, certificates) { + for (auto&& storedCert : certificates) { if (storedCert->toDER() == certificate->toDER()) { return true; } diff --git a/Swift/Controllers/Storages/VCardFileStorage.cpp b/Swift/Controllers/Storages/VCardFileStorage.cpp index dbb6799..2fdadf6 100644 --- a/Swift/Controllers/Storages/VCardFileStorage.cpp +++ b/Swift/Controllers/Storages/VCardFileStorage.cpp @@ -13,7 +13,6 @@ #include <Swiften/Base/Path.h> #include <Swiften/Base/String.h> -#include <Swiften/Base/foreach.h> #include <Swiften/Crypto/CryptoProvider.h> #include <Swiften/Elements/VCard.h> #include <Swiften/Entity/GenericPayloadPersister.h> |