From 39390b02dbd5aa7eb21a83773fa561b39f8828bc Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 16 Mar 2018 20:01:14 +0300 Subject: always hated these long expressions: contact_iter makes them much shorter --- plugins/YAMN/src/proto/pop3/pop3comm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/YAMN') diff --git a/plugins/YAMN/src/proto/pop3/pop3comm.cpp b/plugins/YAMN/src/proto/pop3/pop3comm.cpp index 71b34d6a27..280244d8a1 100644 --- a/plugins/YAMN/src/proto/pop3/pop3comm.cpp +++ b/plugins/YAMN/src/proto/pop3/pop3comm.cpp @@ -283,7 +283,7 @@ int RegisterPOP3Plugin(WPARAM, LPARAM) for (Finder = POP3Plugin->FirstAccount; Finder != nullptr; Finder = Finder->Next) { Finder->hContact = NULL; - for (MCONTACT hContact = db_find_first(YAMN_DBMODULE); hContact; hContact = db_find_next(hContact, YAMN_DBMODULE)) { + for (auto &hContact : contact_iter(YAMN_DBMODULE)) { if (!db_get_s(hContact, YAMN_DBMODULE, "Id", &dbv)) { if (mir_strcmp(dbv.pszVal, Finder->Name) == 0) { Finder->hContact = hContact; -- cgit v1.2.3