comctl32: Simplify is_textT by omitting isW.
Gerald Pfeifer
gerald at pfeifer.com
Sun May 9 07:43:49 CDT 2010
isW is not actually used by is_textT, so we can simplify listview.c a
bit by omitting the useless parameter.
Gerald
---
dlls/comctl32/listview.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index 4c24a67..c6e1bc0 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -482,7 +482,7 @@ static inline BOOL is_textW(LPCWSTR text)
return text != NULL && text != LPSTR_TEXTCALLBACKW;
}
-static inline BOOL is_textT(LPCWSTR text, BOOL isW)
+static inline BOOL is_textT(LPCWSTR text)
{
/* we can ignore isW since LPSTR_TEXTCALLBACKW == LPSTR_TEXTCALLBACKA */
return is_textW(text);
@@ -490,7 +490,7 @@ static inline BOOL is_textT(LPCWSTR text, BOOL isW)
static inline int textlenT(LPCWSTR text, BOOL isW)
{
- return !is_textT(text, isW) ? 0 :
+ return !is_textT(text) ? 0 :
isW ? lstrlenW(text) : lstrlenA((LPCSTR)text);
}
@@ -508,7 +508,7 @@ static inline LPWSTR textdupTtoW(LPCWSTR text, BOOL isW)
{
LPWSTR wstr = (LPWSTR)text;
- if (!isW && is_textT(text, isW))
+ if (!isW && is_textT(text))
{
INT len = MultiByteToWideChar(CP_ACP, 0, (LPCSTR)text, -1, NULL, 0);
wstr = Alloc(len * sizeof(WCHAR));
@@ -520,7 +520,7 @@ static inline LPWSTR textdupTtoW(LPCWSTR text, BOOL isW)
static inline void textfreeT(LPWSTR wstr, BOOL isW)
{
- if (!isW && is_textT(wstr, isW)) Free (wstr);
+ if (!isW && is_textT(wstr)) Free (wstr);
}
/*
@@ -949,7 +949,7 @@ static BOOL notify_dispinfoT(const LISTVIEW_INFO *infoPtr, UINT notificationCode
UINT realNotifCode;
LPWSTR pszTempBuf = NULL, savPszText = NULL;
- if ((pdi->item.mask & LVIF_TEXT) && is_textT(pdi->item.pszText, isW))
+ if ((pdi->item.mask & LVIF_TEXT) && is_textT(pdi->item.pszText))
{
convertToAnsi = (isW && infoPtr->notifyFormat == NFR_ANSI);
convertToUnicode = (!isW && infoPtr->notifyFormat == NFR_UNICODE);
@@ -2328,7 +2328,7 @@ static void LISTVIEW_GetItemMetrics(const LISTVIEW_INFO *infoPtr, const LVITEMW
/* we need the text in non owner draw mode */
assert(lpLVItem->mask & LVIF_TEXT);
- if (is_textT(lpLVItem->pszText, TRUE))
+ if (is_textT(lpLVItem->pszText))
{
HFONT hFont = infoPtr->hFont ? infoPtr->hFont : infoPtr->hDefaultFont;
HDC hdc = GetDC(infoPtr->hwndSelf);
@@ -7358,7 +7358,7 @@ static INT LISTVIEW_GetStringWidthT(const LISTVIEW_INFO *infoPtr, LPCWSTR lpszTe
SIZE stringSize;
stringSize.cx = 0;
- if (is_textT(lpszText, isW))
+ if (is_textT(lpszText))
{
HFONT hFont = infoPtr->hFont ? infoPtr->hFont : infoPtr->hDefaultFont;
HDC hdc = GetDC(infoPtr->hwndSelf);
--
1.6.6.2
More information about the wine-patches
mailing list