diff options
author | George Hazan <ghazan@miranda.im> | 2018-03-16 20:01:14 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-03-16 20:01:14 +0300 |
commit | 39390b02dbd5aa7eb21a83773fa561b39f8828bc (patch) | |
tree | 7982eda1257f7466b5663c2865fdb7804c397257 /plugins/NewsAggregator/Src/Utils.cpp | |
parent | 5046973a41e412afd06d6a78a3b9bce226e3cf50 (diff) |
always hated these long expressions: contact_iter makes them much shorter
Diffstat (limited to 'plugins/NewsAggregator/Src/Utils.cpp')
-rw-r--r-- | plugins/NewsAggregator/Src/Utils.cpp | 4 |
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;
|