wordpad: Remove superfluous pointer casts.

Michael Stefaniuc mstefani at redhat.de
Sat Jan 17 15:56:19 CST 2009


---
 programs/wordpad/print.c   |    8 ++++----
 programs/wordpad/wordpad.c |   12 ++++++------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/programs/wordpad/print.c b/programs/wordpad/print.c
index ee35d4a..2aa642f 100644
--- a/programs/wordpad/print.c
+++ b/programs/wordpad/print.c
@@ -95,7 +95,7 @@ static void AddTextButton(HWND hRebarWnd, UINT string, UINT command, UINT id)
     LoadStringW(hInstance, string, text, MAX_STRING_LEN);
     hButton = CreateWindowW(WC_BUTTONW, text,
                             WS_VISIBLE | WS_CHILD, 5, 5, 100, 15,
-                            hRebarWnd, (HMENU)ULongToHandle(command), hInstance, NULL);
+                            hRebarWnd, ULongToHandle(command), hInstance, NULL);
 
     rb.cbSize = sizeof(rb);
     rb.fMask = RBBIM_SIZE | RBBIM_CHILDSIZE | RBBIM_STYLE | RBBIM_CHILD | RBBIM_IDEALSIZE | RBBIM_ID;
@@ -226,12 +226,12 @@ static LPWSTR dialog_print_to_file(HWND hMainWnd)
     ofn.Flags = OFN_PATHMUSTEXIST | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT;
     ofn.hwndOwner = hMainWnd;
     ofn.lpstrFilter = file_filter;
-    ofn.lpstrFile = (LPWSTR)file;
+    ofn.lpstrFile = file;
     ofn.nMaxFile = MAX_PATH;
-    ofn.lpstrDefExt = (LPWSTR)defExt;
+    ofn.lpstrDefExt = defExt;
 
     if(GetSaveFileNameW(&ofn))
-        return (LPWSTR)file;
+        return file;
     else
         return FALSE;
 }
diff --git a/programs/wordpad/wordpad.c b/programs/wordpad/wordpad.c
index 251b6b4..0120d4e 100644
--- a/programs/wordpad/wordpad.c
+++ b/programs/wordpad/wordpad.c
@@ -301,7 +301,7 @@ static void on_sizelist_modified(HWND hwndSizeList, LPWSTR wszNewFontSize)
     if(lstrcmpW(sizeBuffer, wszNewFontSize))
     {
         float size = 0;
-        if(number_from_string((LPCWSTR) wszNewFontSize, &size, FALSE)
+        if(number_from_string(wszNewFontSize, &size, FALSE)
            && size > 0)
         {
             set_size(size);
@@ -322,7 +322,7 @@ static void add_size(HWND hSizeListWnd, unsigned size)
     cbItem.iItem = -1;
 
     wsprintfW(buffer, stringFormat, size);
-    cbItem.pszText = (LPWSTR)buffer;
+    cbItem.pszText = buffer;
     SendMessageW(hSizeListWnd, CBEM_INSERTITEMW, 0, (LPARAM)&cbItem);
 }
 
@@ -494,7 +494,7 @@ static void on_fontlist_modified(LPWSTR wszNewFaceName)
     SendMessageW(hEditorWnd, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&format);
 
     if(lstrcmpW(format.szFaceName, wszNewFaceName))
-        set_font((LPCWSTR) wszNewFaceName);
+        set_font(wszNewFaceName);
 }
 
 static void add_font(LPCWSTR fontName, DWORD fontType, HWND hListWnd, const NEWTEXTMETRICEXW *ntmc)
@@ -1412,11 +1412,11 @@ static INT_PTR CALLBACK newfile_proc(HWND hWnd, UINT message, WPARAM wParam, LPA
                 WCHAR buffer[MAX_STRING_LEN];
                 HWND hListWnd = GetDlgItem(hWnd, IDC_NEWFILE);
 
-                LoadStringW(hInstance, STRING_NEWFILE_RICHTEXT, (LPWSTR)buffer, MAX_STRING_LEN);
+                LoadStringW(hInstance, STRING_NEWFILE_RICHTEXT, buffer, MAX_STRING_LEN);
                 SendMessageW(hListWnd, LB_ADDSTRING, 0, (LPARAM)&buffer);
-                LoadStringW(hInstance, STRING_NEWFILE_TXT, (LPWSTR)buffer, MAX_STRING_LEN);
+                LoadStringW(hInstance, STRING_NEWFILE_TXT, buffer, MAX_STRING_LEN);
                 SendMessageW(hListWnd, LB_ADDSTRING, 0, (LPARAM)&buffer);
-                LoadStringW(hInstance, STRING_NEWFILE_TXT_UNICODE, (LPWSTR)buffer, MAX_STRING_LEN);
+                LoadStringW(hInstance, STRING_NEWFILE_TXT_UNICODE, buffer, MAX_STRING_LEN);
                 SendMessageW(hListWnd, LB_ADDSTRING, 0, (LPARAM)&buffer);
 
                 SendMessageW(hListWnd, LB_SETSEL, TRUE, 0);
-- 
1.6.0.6
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20090117/a8c6903a/attachment.pgp 


More information about the wine-patches mailing list