summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-08-09 06:45:13 (GMT)
committerMontel Laurent <montel@kde.org>2016-08-09 06:45:25 (GMT)
commitc6622835f203c491582f06b752cab023a713b2b9 (patch)
treeb21bfba69c26156dccbb39678d87fceadf3c65f5
parenta906a1d2d763e53df9a5c323d4cd2698950f3187 (diff)
Minor optimization
-rw-r--r--src/kcalprefs.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/kcalprefs.cpp b/src/kcalprefs.cpp
index 5425c46..ef58ab6 100644
--- a/src/kcalprefs.cpp
+++ b/src/kcalprefs.cpp
@@ -252,7 +252,8 @@ QStringList KCalPrefs::fullEmails()
QStringList::Iterator it;
KIdentityManagement::IdentityManager::ConstIterator it1;
- for (it1 = idmanager->begin(); it1 != idmanager->end(); ++it1) {
+ KIdentityManagement::IdentityManager::ConstIterator end1(idmanager->end());
+ for (it1 = idmanager->begin(); it1 != end1; ++it1) {
fullEmails << (*it1).fullEmailAddr();
}
// Add emails configured in korganizer
@@ -294,8 +295,9 @@ bool KCalPrefs::thatIsMe(const QString &_email)
}
CalendarSupport::IdentityManager::ConstIterator it;
+ CalendarSupport::IdentityManager::ConstIterator endId(CalendarSupport::identityManager()->end());
for (it = CalendarSupport::identityManager()->begin();
- it != CalendarSupport::identityManager()->end(); ++it) {
+ it != endId; ++it) {
if ((*it).matchesEmailAddress(email)) {
return true;
}