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/NewAwaySysMod/src/AwaySys.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/NewAwaySysMod/src/AwaySys.cpp') diff --git a/plugins/NewAwaySysMod/src/AwaySys.cpp b/plugins/NewAwaySysMod/src/AwaySys.cpp index fd339acc69..37f378319d 100644 --- a/plugins/NewAwaySysMod/src/AwaySys.cpp +++ b/plugins/NewAwaySysMod/src/AwaySys.cpp @@ -133,7 +133,7 @@ int StatusMsgReq(WPARAM wParam, LPARAM lParam, CString &szProto) // find the contact char *szFoundProto; MCONTACT hFoundContact = NULL; // if we'll find the contact only on some other protocol, but not on szProto, then we'll use that hContact. - for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { + for (auto &hContact : contact_iter()) { char *szCurProto = GetContactProto(hContact); if (db_get_dw(hContact, szCurProto, "UIN", 0) == lParam) { szFoundProto = szCurProto; -- cgit v1.2.3