From 3ad5334f17119c9ae010d5059f5cfb1831c9ddbd Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 17 Mar 2018 22:11:51 +0300 Subject: more warning fixes --- plugins/NewsAggregator/Src/Utils.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'plugins/NewsAggregator/Src/Utils.cpp') 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; } -- cgit v1.2.3