diff options
author | George Hazan <ghazan@miranda.im> | 2018-03-17 22:11:51 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-03-17 22:11:59 +0300 |
commit | 3ad5334f17119c9ae010d5059f5cfb1831c9ddbd (patch) | |
tree | 1d76618499baee7cf217c97dfe2045b467d20a0a /protocols/MRA | |
parent | f632783f27da5dd0ed3513bbee6182ea8af30afe (diff) |
more warning fixes
Diffstat (limited to 'protocols/MRA')
-rw-r--r-- | protocols/MRA/src/Mra_functions.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/protocols/MRA/src/Mra_functions.cpp b/protocols/MRA/src/Mra_functions.cpp index 70e1ed567d..0de82591be 100644 --- a/protocols/MRA/src/Mra_functions.cpp +++ b/protocols/MRA/src/Mra_functions.cpp @@ -508,16 +508,18 @@ MCONTACT CMraProto::MraHContactFromEmail(const CMStringA &szEmail, BOOL bAddIfNe MCONTACT hContact = NULL;
bool bFound = false;
- //check not already on list
+ // check not already on list
CMStringA szEMailLocal;
- for (auto &hContact : AccContacts()) {
- if (mraGetStringA(hContact, "e-mail", szEMailLocal))
+ for (auto &cc : AccContacts()) {
+ if (mraGetStringA(cc, "e-mail", szEMailLocal)) {
if (szEMailLocal == szEmail) {
if (bTemporary == FALSE)
- db_unset(hContact, "CList", "NotOnList");
+ db_unset(cc, "CList", "NotOnList");
+ hContact = cc;
bFound = true;
break;
}
+ }
}
if (!bFound && bAddIfNeeded) {
@@ -549,7 +551,7 @@ MCONTACT CMraProto::MraHContactFromEmail(const CMStringA &szEmail, BOOL bAddIfNe }
if (pbAdded)
- *pbAdded = (bFound == FALSE && bAddIfNeeded && hContact);
+ *pbAdded = (bFound == false && bAddIfNeeded && hContact);
return hContact;
}
|