From 6e96535fdbb886dcad1a3396659b368283922e64 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 21 Feb 2018 18:36:32 +0300 Subject: Jabber: C++'11 iterators --- protocols/JabberG/src/jabber_search.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'protocols/JabberG/src/jabber_search.cpp') diff --git a/protocols/JabberG/src/jabber_search.cpp b/protocols/JabberG/src/jabber_search.cpp index 001c4b2a04..1872aef10a 100644 --- a/protocols/JabberG/src/jabber_search.cpp +++ b/protocols/JabberG/src/jabber_search.cpp @@ -400,8 +400,8 @@ void CJabberProto::OnIqResultAdvancedSearch(HXML iqNode, CJabberIqInfo*) SearchReturnResults((HANDLE)id, (void*)&SearchResults, (U_TCHAR_MAP *)&mColumnsNames); - for (int i = 0; i < SearchResults.getCount(); i++) - delete ((U_TCHAR_MAP*)SearchResults[i]); + for (auto &it : SearchResults) + delete ((U_TCHAR_MAP*)it); //send success to finish searching ProtoBroadcastAck(0, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0); -- cgit v1.2.3