Michael Stefaniuc : user.exe: Remove some superfluous WPARAM/LPARAM casts.
Alexandre Julliard
julliard at winehq.org
Wed Dec 30 10:18:16 CST 2009
Module: wine
Branch: master
Commit: 453cf859a8a4950ea6548ed4798beb03bead053a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=453cf859a8a4950ea6548ed4798beb03bead053a
Author: Michael Stefaniuc <mstefani at redhat.de>
Date: Tue Dec 29 23:16:10 2009 +0100
user.exe: Remove some superfluous WPARAM/LPARAM casts.
---
dlls/user.exe16/dialog.c | 4 ++--
dlls/user.exe16/message.c | 2 +-
dlls/user.exe16/user.c | 13 ++++++-------
dlls/user.exe16/window.c | 10 +++++-----
4 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/dlls/user.exe16/dialog.c b/dlls/user.exe16/dialog.c
index 469a06f..04f2435 100644
--- a/dlls/user.exe16/dialog.c
+++ b/dlls/user.exe16/dialog.c
@@ -541,7 +541,7 @@ HWND16 WINAPI GetDlgItem16( HWND16 hwndDlg, INT16 id )
*/
void WINAPI SetDlgItemText16( HWND16 hwnd, INT16 id, SEGPTR lpString )
{
- SendDlgItemMessage16( hwnd, id, WM_SETTEXT, 0, (LPARAM)lpString );
+ SendDlgItemMessage16( hwnd, id, WM_SETTEXT, 0, lpString );
}
@@ -550,7 +550,7 @@ void WINAPI SetDlgItemText16( HWND16 hwnd, INT16 id, SEGPTR lpString )
*/
INT16 WINAPI GetDlgItemText16( HWND16 hwnd, INT16 id, SEGPTR str, UINT16 len )
{
- return (INT16)SendDlgItemMessage16( hwnd, id, WM_GETTEXT, len, (LPARAM)str );
+ return SendDlgItemMessage16( hwnd, id, WM_GETTEXT, len, str );
}
diff --git a/dlls/user.exe16/message.c b/dlls/user.exe16/message.c
index 7dccc5f..011e5c4 100644
--- a/dlls/user.exe16/message.c
+++ b/dlls/user.exe16/message.c
@@ -2287,7 +2287,7 @@ static LRESULT edit_proc16( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, B
(INT)(SHORT)LOWORD(lParam), FALSE );
break;
case EM_LINEINDEX16:
- if ((INT16)wParam == -1) wParam = (WPARAM)-1;
+ if ((INT16)wParam == -1) wParam = -1;
result = wow_handlers32.edit_proc( hwnd, msg - msg16_offset, wParam, lParam, FALSE );
break;
case EM_SETSEL16:
diff --git a/dlls/user.exe16/user.c b/dlls/user.exe16/user.c
index 7521c54..0b321b7 100644
--- a/dlls/user.exe16/user.c
+++ b/dlls/user.exe16/user.c
@@ -2743,22 +2743,21 @@ DWORD WINAPI DragObject16( HWND16 hwndScope, HWND16 hWnd, UINT16 wObj,
SetCursor(hCurrentCursor);
/* send WM_DRAGLOOP */
- SendMessage16( hWnd, WM_DRAGLOOP, (WPARAM16)(hCurrentCursor != hBummer),
- (LPARAM) spDragInfo );
+ SendMessage16( hWnd, WM_DRAGLOOP, hCurrentCursor != hBummer, spDragInfo );
/* send WM_DRAGSELECT or WM_DRAGMOVE */
if( hCurrentWnd != lpDragInfo->hScope )
{
if( hCurrentWnd )
SendMessage16( hCurrentWnd, WM_DRAGSELECT, 0,
- (LPARAM)MAKELONG(LOWORD(spDragInfo)+sizeof(DRAGINFO16),
- HIWORD(spDragInfo)) );
+ MAKELPARAM(LOWORD(spDragInfo)+sizeof(DRAGINFO16),
+ HIWORD(spDragInfo)) );
hCurrentWnd = lpDragInfo->hScope;
if( hCurrentWnd )
- SendMessage16( hCurrentWnd, WM_DRAGSELECT, 1, (LPARAM)spDragInfo);
+ SendMessage16( hCurrentWnd, WM_DRAGSELECT, 1, spDragInfo);
}
else
if( hCurrentWnd )
- SendMessage16( hCurrentWnd, WM_DRAGMOVE, 0, (LPARAM)spDragInfo);
+ SendMessage16( hCurrentWnd, WM_DRAGMOVE, 0, spDragInfo);
} while( msg.message != WM_LBUTTONUP && msg.message != WM_NCLBUTTONUP );
@@ -2769,7 +2768,7 @@ DWORD WINAPI DragObject16( HWND16 hwndScope, HWND16 hWnd, UINT16 wObj,
if( hCurrentCursor != hBummer )
msg.lParam = SendMessage16( lpDragInfo->hScope, WM_DROPOBJECT,
- (WPARAM16)hWnd, (LPARAM)spDragInfo );
+ hWnd, spDragInfo );
else
msg.lParam = 0;
GlobalFree16(hDragInfo);
diff --git a/dlls/user.exe16/window.c b/dlls/user.exe16/window.c
index 244924f..0bd4518 100644
--- a/dlls/user.exe16/window.c
+++ b/dlls/user.exe16/window.c
@@ -347,7 +347,7 @@ INT16 WINAPI GetWindowText16( HWND16 hwnd, SEGPTR lpString, INT16 nMaxCount )
*/
BOOL16 WINAPI SetWindowText16( HWND16 hwnd, SEGPTR lpString )
{
- return SendMessage16( hwnd, WM_SETTEXT, 0, (LPARAM)lpString );
+ return SendMessage16( hwnd, WM_SETTEXT, 0, lpString );
}
@@ -1475,9 +1475,9 @@ void WINAPI PaintRect16( HWND16 hwndParent, HWND16 hwnd, HDC16 hdc,
HWND parent = WIN_Handle32(hwndParent), hwnd32 = WIN_Handle32(hwnd);
if (!parent) return;
- hbrush = SendMessageW( parent, WM_CTLCOLORMSGBOX + hbrush, (WPARAM)hdc, (LPARAM)hwnd32 );
+ hbrush = SendMessageW( parent, WM_CTLCOLORMSGBOX + hbrush, hdc, (LPARAM)hwnd32 );
if (!hbrush) hbrush = DefWindowProcW( parent, WM_CTLCOLORMSGBOX + hbrush,
- (WPARAM)hdc, (LPARAM)hwnd32 );
+ hdc, (LPARAM)hwnd32 );
}
if (hbrush) FillRect16( hdc, rect, hbrush );
}
@@ -1493,9 +1493,9 @@ HBRUSH16 WINAPI GetControlBrush16( HWND16 hwnd, HDC16 hdc, UINT16 ctlType )
HWND parent = GetParent( hwnd32 );
if (!parent) parent = hwnd32;
- ret = SendMessageW( parent, WM_CTLCOLORMSGBOX + ctlType, (WPARAM)hdc, (LPARAM)hwnd32 );
+ ret = SendMessageW( parent, WM_CTLCOLORMSGBOX + ctlType, hdc, (LPARAM)hwnd32 );
if (!ret) ret = DefWindowProcW( parent, WM_CTLCOLORMSGBOX + ctlType,
- (WPARAM)hdc, (LPARAM)hwnd32 );
+ hdc, (LPARAM)hwnd32 );
return ret;
}
More information about the wine-cvs
mailing list