summaryrefslogtreecommitdiff
path: root/plugins/NewsAggregator/Src/Utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/NewsAggregator/Src/Utils.cpp')
-rw-r--r--plugins/NewsAggregator/Src/Utils.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/NewsAggregator/Src/Utils.cpp b/plugins/NewsAggregator/Src/Utils.cpp
index b6da7a9e0a..d2e646c5e8 100644
--- a/plugins/NewsAggregator/Src/Utils.cpp
+++ b/plugins/NewsAggregator/Src/Utils.cpp
@@ -431,7 +431,7 @@ MCONTACT GetContactByNick(const wchar_t *nick)
{
MCONTACT hContact = NULL;
- for (hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
+ for (auto &hContact : contact_iter(MODULE)) {
ptrW contactNick(::db_get_wsa(hContact, MODULE, "Nick"));
if (!mir_wstrcmpi(contactNick, nick))
break;
@@ -443,7 +443,7 @@ MCONTACT GetContactByURL(const wchar_t *url)
{
MCONTACT hContact = NULL;
- for (hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
+ for (auto &hContact : contact_iter(MODULE)) {
ptrW contactURL(::db_get_wsa(hContact, MODULE, "URL"));
if (!mir_wstrcmpi(contactURL, url))
break;