diff options
Diffstat (limited to 'plugins/NewsAggregator/Src/Utils.cpp')
-rw-r--r-- | plugins/NewsAggregator/Src/Utils.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/plugins/NewsAggregator/Src/Utils.cpp b/plugins/NewsAggregator/Src/Utils.cpp index 4eff01b870..56a5a99182 100644 --- a/plugins/NewsAggregator/Src/Utils.cpp +++ b/plugins/NewsAggregator/Src/Utils.cpp @@ -429,24 +429,20 @@ LPCTSTR ClearText(CMStringW &result, const wchar_t *message) MCONTACT GetContactByNick(const wchar_t *nick)
{
- MCONTACT hContact = NULL;
-
for (auto &hContact : Contacts(MODULE)) {
ptrW contactNick(::db_get_wsa(hContact, MODULE, "Nick"));
if (!mir_wstrcmpi(contactNick, nick))
- break;
+ return hContact;
}
- return hContact;
+ return 0;
}
MCONTACT GetContactByURL(const wchar_t *url)
{
- MCONTACT hContact = NULL;
-
for (auto &hContact : Contacts(MODULE)) {
ptrW contactURL(::db_get_wsa(hContact, MODULE, "URL"));
if (!mir_wstrcmpi(contactURL, url))
- break;
+ return hContact;
}
- return hContact;
+ return 0;
}
|