From 962555da3092fbe8ff6e65eb590c1fa38bf1a124 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 26 Oct 2012 16:30:03 +0000 Subject: more efficient sorting git-svn-id: http://svn.miranda-ng.org/main/trunk@2086 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/plugins/pluginopts.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/modules') diff --git a/src/modules/plugins/pluginopts.cpp b/src/modules/plugins/pluginopts.cpp index 7a7956a5da..7e6012577c 100644 --- a/src/modules/plugins/pluginopts.cpp +++ b/src/modules/plugins/pluginopts.cpp @@ -230,11 +230,8 @@ static LRESULT CALLBACK PluginListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LP static int CALLBACK SortPlugins(WPARAM i1, LPARAM i2, LPARAM lParamSort) { - HWND hwndList = (HWND)lParamSort; - TCHAR tszFile1[MAX_PATH], tszFile2[MAX_PATH]; - ListView_GetItemText(hwndList, i1, 2, tszFile1, SIZEOF(tszFile1)); - ListView_GetItemText(hwndList, i2, 2, tszFile2, SIZEOF(tszFile2)); - return _tcscmp(tszFile1, tszFile2); // always sorting backwards + PluginListItemData *p1 = (PluginListItemData*)i1, *p2 = (PluginListItemData*)i2; + return _tcscmp(p1->fileName, p2->fileName); } INT_PTR CALLBACK DlgPluginOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) -- cgit v1.2.3