Module: wine Branch: master Commit: 65d64e15c8c689c6693aba9a25f8847485f8732b URL: http://source.winehq.org/git/wine.git/?a=commit;h=65d64e15c8c689c6693aba9a25...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Mon May 22 00:09:41 2017 +0300
comctl32/listview: Simplify a couple of conditions that are using LVFI_PARTIAL.
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/comctl32/listview.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 35c2453..459bb38 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -6344,8 +6344,7 @@ static INT LISTVIEW_FindItemW(const LISTVIEW_INFO *infoPtr, INT nStart, if (!lpFindInfo || nItem < 0) return -1;
lvItem.mask = 0; - if (lpFindInfo->flags & (LVFI_STRING | LVFI_PARTIAL) || - lpFindInfo->flags & LVFI_SUBSTRING) + if (lpFindInfo->flags & (LVFI_STRING | LVFI_PARTIAL | LVFI_SUBSTRING)) { lvItem.mask |= LVIF_TEXT; lvItem.pszText = szDispText; @@ -6469,14 +6468,13 @@ again: static INT LISTVIEW_FindItemA(const LISTVIEW_INFO *infoPtr, INT nStart, const LVFINDINFOA *lpFindInfo) { - BOOL hasText = lpFindInfo->flags & (LVFI_STRING | LVFI_PARTIAL) || - lpFindInfo->flags & LVFI_SUBSTRING; LVFINDINFOW fiw; INT res; LPWSTR strW = NULL;
memcpy(&fiw, lpFindInfo, sizeof(fiw)); - if (hasText) fiw.psz = strW = textdupTtoW((LPCWSTR)lpFindInfo->psz, FALSE); + if (lpFindInfo->flags & (LVFI_STRING | LVFI_PARTIAL | LVFI_SUBSTRING)) + fiw.psz = strW = textdupTtoW((LPCWSTR)lpFindInfo->psz, FALSE); res = LISTVIEW_FindItemW(infoPtr, nStart, &fiw); textfreeT(strW, FALSE); return res;