comctl32/header: Use wide string literals.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2020-05-04 14:11:57 +03:00 committed by Alexandre Julliard
parent c358de84c8
commit 6dbe2b5348
1 changed files with 2 additions and 4 deletions

View File

@ -111,7 +111,7 @@ static void HEADER_FreeCallbackItems(HEADER_ITEM *lpItem);
static LRESULT HEADER_SendNotify(const HEADER_INFO *infoPtr, UINT code, NMHDR *hdr); static LRESULT HEADER_SendNotify(const HEADER_INFO *infoPtr, UINT code, NMHDR *hdr);
static LRESULT HEADER_SendCtrlCustomDraw(const HEADER_INFO *infoPtr, DWORD dwDrawStage, HDC hdc, const RECT *rect); static LRESULT HEADER_SendCtrlCustomDraw(const HEADER_INFO *infoPtr, DWORD dwDrawStage, HDC hdc, const RECT *rect);
static const WCHAR themeClass[] = {'H','e','a','d','e','r',0}; static const WCHAR themeClass[] = L"Header";
static void HEADER_StoreHDItemInHeader(HEADER_ITEM *lpItem, UINT mask, const HDITEMW *phdi, BOOL fUnicode) static void HEADER_StoreHDItemInHeader(HEADER_ITEM *lpItem, UINT mask, const HDITEMW *phdi, BOOL fUnicode)
{ {
@ -146,9 +146,7 @@ static void HEADER_StoreHDItemInHeader(HEADER_ITEM *lpItem, UINT mask, const HDI
if (phdi->pszText != LPSTR_TEXTCALLBACKW) /* covers != TEXTCALLBACKA too */ if (phdi->pszText != LPSTR_TEXTCALLBACKW) /* covers != TEXTCALLBACKA too */
{ {
static const WCHAR emptyString[] = {0}; const WCHAR *pszText = phdi->pszText != NULL ? phdi->pszText : L"";
LPCWSTR pszText = (phdi->pszText != NULL ? phdi->pszText : emptyString);
if (fUnicode) if (fUnicode)
Str_SetPtrW(&lpItem->pszText, pszText); Str_SetPtrW(&lpItem->pszText, pszText);
else else