Commit b56583ec authored by Jon Griffiths's avatar Jon Griffiths Committed by Alexandre Julliard

Don't call GetWindowLong for every comparison while sorting.

parent c91c8686
...@@ -7186,7 +7186,7 @@ static HWND LISTVIEW_SetToolTips( LISTVIEW_INFO *infoPtr, HWND hwndNewToolTip) ...@@ -7186,7 +7186,7 @@ static HWND LISTVIEW_SetToolTips( LISTVIEW_INFO *infoPtr, HWND hwndNewToolTip)
*/ */
static INT WINAPI LISTVIEW_CallBackCompare(LPVOID first, LPVOID second, LPARAM lParam) static INT WINAPI LISTVIEW_CallBackCompare(LPVOID first, LPVOID second, LPARAM lParam)
{ {
LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW((HWND)lParam, 0); LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)lParam;
ITEM_INFO* lv_first = (ITEM_INFO*) DPA_GetPtr( (HDPA)first, 0 ); ITEM_INFO* lv_first = (ITEM_INFO*) DPA_GetPtr( (HDPA)first, 0 );
ITEM_INFO* lv_second = (ITEM_INFO*) DPA_GetPtr( (HDPA)second, 0 ); ITEM_INFO* lv_second = (ITEM_INFO*) DPA_GetPtr( (HDPA)second, 0 );
...@@ -7237,7 +7237,7 @@ static BOOL LISTVIEW_SortItems(LISTVIEW_INFO *infoPtr, PFNLVCOMPARE pfnCompare, ...@@ -7237,7 +7237,7 @@ static BOOL LISTVIEW_SortItems(LISTVIEW_INFO *infoPtr, PFNLVCOMPARE pfnCompare,
infoPtr->pfnCompare = pfnCompare; infoPtr->pfnCompare = pfnCompare;
infoPtr->lParamSort = lParamSort; infoPtr->lParamSort = lParamSort;
DPA_Sort(infoPtr->hdpaItems, LISTVIEW_CallBackCompare, (LPARAM)infoPtr->hwndSelf); DPA_Sort(infoPtr->hdpaItems, LISTVIEW_CallBackCompare, (LPARAM)infoPtr);
/* Adjust selections and indices so that they are the way they should /* Adjust selections and indices so that they are the way they should
* be after the sort (otherwise, the list items move around, but * be after the sort (otherwise, the list items move around, but
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment