[pim/kdepim-addons] kmail/editorsendcheckplugins/checkbeforesend/duplicateemails: Two branches were the same result => symplify it
Laurent Montel <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 70a55ea5c5c8ccdd97e9254e64d5ca3b276b5cc8 by Laurent Montel.
Committed on 15/08/2026 at 08:11.
Pushed by mlaurent into branch 'master'.
Two branches were the same result => symplify it
M +1 -5 kmail/editorsendcheckplugins/checkbeforesend/duplicateemails/checkduplicateemailsjob.cpp
https://invent.kde.org/pim/kdepim-addons/-/commit/70a55ea5c5c8ccdd97e9254e64d5ca3b276b5cc8
diff --git a/kmail/editorsendcheckplugins/checkbeforesend/duplicateemails/checkduplicateemailsjob.cpp b/kmail/editorsendcheckplugins/checkbeforesend/duplicateemails/checkduplicateemailsjob.cpp
index da72a417f..601ddc07a 100644
--- a/kmail/editorsendcheckplugins/checkbeforesend/duplicateemails/checkduplicateemailsjob.cpp
+++ b/kmail/editorsendcheckplugins/checkbeforesend/duplicateemails/checkduplicateemailsjob.cpp
@@ -27,11 +27,7 @@ void CheckDuplicateEmailsJob::start()
if (!temail.isEmpty()) {
const int val = results.value(temail, 0);
- if (val == 0) {
- results.insert(temail, val + 1);
- } else {
- results[temail] = val + 1;
- }
+ results[temail] = val + 1;
}
}
for (const auto &[key, value] : results.asKeyValueRange()) {