Andrew Talbot : comctl32: Constify some variables.
Alexandre Julliard
julliard at winehq.org
Fri Jun 20 06:22:14 CDT 2008
Module: wine
Branch: master
Commit: fb44bc2106169ff4be10a368b6820d5ad1d942ce
URL: http://source.winehq.org/git/wine.git/?a=commit;h=fb44bc2106169ff4be10a368b6820d5ad1d942ce
Author: Andrew Talbot <andrew.talbot at talbotville.com>
Date: Thu Jun 19 21:52:05 2008 +0100
comctl32: Constify some variables.
---
dlls/comctl32/header.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/comctl32/header.c b/dlls/comctl32/header.c
index 5757f7a..af1923c 100644
--- a/dlls/comctl32/header.c
+++ b/dlls/comctl32/header.c
@@ -111,7 +111,6 @@ static LRESULT HEADER_SendNotify(HWND hwnd, UINT code, NMHDR *hdr);
static LRESULT HEADER_SendCtrlCustomDraw(HWND hwnd, DWORD dwDrawStage, HDC hdc, const RECT *rect);
static const WCHAR themeClass[] = {'H','e','a','d','e','r',0};
-static WCHAR emptyString[] = {0};
static void HEADER_StoreHDItemInHeader(HEADER_ITEM *lpItem, UINT mask, const HDITEMW *phdi, BOOL fUnicode)
{
@@ -146,11 +145,13 @@ static void HEADER_StoreHDItemInHeader(HEADER_ITEM *lpItem, UINT mask, const HDI
if (phdi->pszText != LPSTR_TEXTCALLBACKW) /* covers != TEXTCALLBACKA too */
{
- LPWSTR pszText = (phdi->pszText != NULL ? phdi->pszText : emptyString);
+ static const WCHAR emptyString[] = {0};
+
+ LPCWSTR pszText = (phdi->pszText != NULL ? phdi->pszText : emptyString);
if (fUnicode)
Str_SetPtrW(&lpItem->pszText, pszText);
else
- Str_SetPtrAtoW(&lpItem->pszText, (LPSTR)pszText);
+ Str_SetPtrAtoW(&lpItem->pszText, (LPCSTR)pszText);
lpItem->callbackMask &= ~HDI_TEXT;
}
else
More information about the wine-cvs
mailing list