From 3dc0d9b0b7c30ea2f77d74c4ce5b6ccd67bd525c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 9 Apr 2013 21:40:22 +0000 Subject: - the kernel filters out contacts by proto names much faster than a plugin; - database cycles simplified git-svn-id: http://svn.miranda-ng.org/main/trunk@4404 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/StopSpamPlus/src/services.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'plugins/StopSpamPlus') diff --git a/plugins/StopSpamPlus/src/services.cpp b/plugins/StopSpamPlus/src/services.cpp index 21b77e14f4..43470f8de7 100644 --- a/plugins/StopSpamPlus/src/services.cpp +++ b/plugins/StopSpamPlus/src/services.cpp @@ -22,10 +22,7 @@ INT_PTR IsContactPassed(WPARAM wParam, LPARAM /*lParam*/) INT_PTR RemoveTempContacts(WPARAM wParam,LPARAM lParam) { - HANDLE hContact = db_find_first(); - while ( hContact ) { - HANDLE hNext = db_find_next(hContact); - + for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { DBVARIANT dbv = { 0 }; if ( db_get_ts( hContact, "CList", "Group", &dbv )) dbv.ptszVal = NULL; @@ -48,7 +45,6 @@ INT_PTR RemoveTempContacts(WPARAM wParam,LPARAM lParam) } db_free( &dbv ); - hContact = hNext; } int hGroup = 1; -- cgit v1.2.3