summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-04-05 21:47:56 +0200
committerMontel Laurent <[email protected]>2017-04-05 21:47:56 +0200
commit64b8741275567ecef5346c262e71538318a09503 (patch)
treec471bb68e74c1ec1b308a7fc778875de9070e0db
parent9cd2aa498fb11978091d8cfb58c1ff61c177c77e (diff)
Minor optimization
-rw-r--r--src/kacalendar.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/kacalendar.cpp b/src/kacalendar.cpp
index a9d2407..79d24d1 100644
--- a/src/kacalendar.cpp
+++ b/src/kacalendar.cpp
@@ -418,14 +418,12 @@ Type type(const QString &mimeType)
Types types(const QStringList &mimeTypes)
{
Types types = nullptr;
- foreach (const QString &type, mimeTypes) {
+ for (const QString &type : mimeTypes) {
if (type == MIME_ACTIVE) {
types |= ACTIVE;
- }
- if (type == MIME_ARCHIVED) {
+ } else if (type == MIME_ARCHIVED) {
types |= ARCHIVED;
- }
- if (type == MIME_TEMPLATE) {
+ } else if (type == MIME_TEMPLATE) {
types |= TEMPLATE;
}
}