Commit 3dfaef37 authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

user32: Remove unneeded casts.

parent ba596d30
...@@ -548,7 +548,7 @@ INT16 WINAPI GetDlgItemText16( HWND16 hwnd, INT16 id, SEGPTR str, UINT16 len ) ...@@ -548,7 +548,7 @@ INT16 WINAPI GetDlgItemText16( HWND16 hwnd, INT16 id, SEGPTR str, UINT16 len )
void WINAPI SetDlgItemInt16( HWND16 hwnd, INT16 id, UINT16 value, BOOL16 fSigned ) void WINAPI SetDlgItemInt16( HWND16 hwnd, INT16 id, UINT16 value, BOOL16 fSigned )
{ {
SetDlgItemInt( WIN_Handle32(hwnd), (UINT)(UINT16)id, SetDlgItemInt( WIN_Handle32(hwnd), (UINT)(UINT16)id,
(UINT)(fSigned ? (INT16) value : (UINT16) value), fSigned ); (UINT)(fSigned ? (INT16) value : value), fSigned );
} }
......
...@@ -2165,8 +2165,7 @@ static void EDIT_MoveWordBackward(EDITSTATE *es, BOOL extend) ...@@ -2165,8 +2165,7 @@ static void EDIT_MoveWordBackward(EDITSTATE *es, BOOL extend)
e = li + EDIT_EM_LineLength(es, li); e = li + EDIT_EM_LineLength(es, li);
} }
} else { } else {
e = li + (INT)EDIT_CallWordBreakProc(es, e = li + EDIT_CallWordBreakProc(es, li, e - li, ll, WB_LEFT);
li, e - li, ll, WB_LEFT);
} }
if (!extend) if (!extend)
s = e; s = e;
......
...@@ -486,10 +486,10 @@ static UINT ICO_ExtractIconExW( ...@@ -486,10 +486,10 @@ static UINT ICO_ExtractIconExW(
if (pCIDir) if (pCIDir)
{ {
RetPtr[icon] = (HICON)CreateIconFromResourceEx(pCIDir, uSize, TRUE, 0x00030000, RetPtr[icon] = CreateIconFromResourceEx(pCIDir, uSize, TRUE, 0x00030000,
cx1, cy1, flags); cx1, cy1, flags);
if (cx2 && cy2) if (cx2 && cy2)
RetPtr[++icon] = (HICON)CreateIconFromResourceEx(pCIDir, uSize, TRUE, 0x00030000, RetPtr[++icon] = CreateIconFromResourceEx(pCIDir, uSize, TRUE, 0x00030000,
cx2, cy2, flags); cx2, cy2, flags);
} }
else else
...@@ -674,11 +674,9 @@ static UINT ICO_ExtractIconExW( ...@@ -674,11 +674,9 @@ static UINT ICO_ExtractIconExW(
RetPtr[i]=0; RetPtr[i]=0;
continue; continue;
} }
RetPtr[i] = (HICON) CreateIconFromResourceEx(idata,idataent->Size,TRUE,0x00030000, RetPtr[i] = CreateIconFromResourceEx(idata, idataent->Size, TRUE, 0x00030000, cx1, cy1, flags);
cx1, cy1, flags);
if (cx2 && cy2) if (cx2 && cy2)
RetPtr[++i] = (HICON) CreateIconFromResourceEx(idata,idataent->Size,TRUE,0x00030000, RetPtr[++i] = CreateIconFromResourceEx(idata, idataent->Size, TRUE, 0x00030000, cx2, cy2, flags);
cx2, cy2, flags);
} }
ret = i; /* return number of retrieved icons */ ret = i; /* return number of retrieved icons */
} /* if(sig == IMAGE_NT_SIGNATURE) */ } /* if(sig == IMAGE_NT_SIGNATURE) */
......
...@@ -474,7 +474,7 @@ INT WINAPI MessageBoxIndirectW( LPMSGBOXPARAMSW msgbox ) ...@@ -474,7 +474,7 @@ INT WINAPI MessageBoxIndirectW( LPMSGBOXPARAMSW msgbox )
if (!(hRes = FindResourceExW(user32_module, (LPWSTR)RT_DIALOG, if (!(hRes = FindResourceExW(user32_module, (LPWSTR)RT_DIALOG,
msg_box_res_nameW, msgbox->dwLanguageId))) msg_box_res_nameW, msgbox->dwLanguageId)))
return 0; return 0;
if (!(tmplate = (LPVOID)LoadResource(user32_module, hRes))) if (!(tmplate = LoadResource(user32_module, hRes)))
return 0; return 0;
if ((msgbox->dwStyle & MB_TASKMODAL) && (msgbox->hwndOwner==NULL)) if ((msgbox->dwStyle & MB_TASKMODAL) && (msgbox->hwndOwner==NULL))
......
...@@ -609,7 +609,7 @@ static BOOL SYSPARAMS_LoadRaw( LPCWSTR lpRegKey, LPCWSTR lpValName, LPBYTE lpBuf ...@@ -609,7 +609,7 @@ static BOOL SYSPARAMS_LoadRaw( LPCWSTR lpRegKey, LPCWSTR lpValName, LPBYTE lpBuf
if ((RegOpenKeyW( get_volatile_regkey(), lpRegKey, &hKey ) == ERROR_SUCCESS) || if ((RegOpenKeyW( get_volatile_regkey(), lpRegKey, &hKey ) == ERROR_SUCCESS) ||
(RegOpenKeyW( HKEY_CURRENT_USER, lpRegKey, &hKey ) == ERROR_SUCCESS)) (RegOpenKeyW( HKEY_CURRENT_USER, lpRegKey, &hKey ) == ERROR_SUCCESS))
{ {
ret = !RegQueryValueExW( hKey, lpValName, NULL, &type, (LPBYTE)lpBuf, &count); ret = !RegQueryValueExW( hKey, lpValName, NULL, &type, lpBuf, &count);
RegCloseKey( hKey ); RegCloseKey( hKey );
} }
return ret; return ret;
......
...@@ -1723,7 +1723,7 @@ static LONG_PTR WIN_GetWindowLong( HWND hwnd, INT offset, UINT size, BOOL unicod ...@@ -1723,7 +1723,7 @@ static LONG_PTR WIN_GetWindowLong( HWND hwnd, INT offset, UINT size, BOOL unicod
case GWLP_USERDATA: retvalue = wndPtr->userdata; break; case GWLP_USERDATA: retvalue = wndPtr->userdata; break;
case GWL_STYLE: retvalue = wndPtr->dwStyle; break; case GWL_STYLE: retvalue = wndPtr->dwStyle; break;
case GWL_EXSTYLE: retvalue = wndPtr->dwExStyle; break; case GWL_EXSTYLE: retvalue = wndPtr->dwExStyle; break;
case GWLP_ID: retvalue = (ULONG_PTR)wndPtr->wIDmenu; break; case GWLP_ID: retvalue = wndPtr->wIDmenu; break;
case GWLP_HINSTANCE: retvalue = (ULONG_PTR)wndPtr->hInstance; break; case GWLP_HINSTANCE: retvalue = (ULONG_PTR)wndPtr->hInstance; break;
case GWLP_WNDPROC: case GWLP_WNDPROC:
/* This looks like a hack only for the edit control (see tests). This makes these controls /* This looks like a hack only for the edit control (see tests). This makes these controls
...@@ -2072,7 +2072,7 @@ LONG WINAPI SetWindowLong16( HWND16 hwnd, INT16 offset, LONG newval ) ...@@ -2072,7 +2072,7 @@ LONG WINAPI SetWindowLong16( HWND16 hwnd, INT16 offset, LONG newval )
{ {
WNDPROC new_proc = WINPROC_AllocProc16( (WNDPROC16)newval ); WNDPROC new_proc = WINPROC_AllocProc16( (WNDPROC16)newval );
WNDPROC old_proc = (WNDPROC)SetWindowLongPtrA( WIN_Handle32(hwnd), offset, (LONG_PTR)new_proc ); WNDPROC old_proc = (WNDPROC)SetWindowLongPtrA( WIN_Handle32(hwnd), offset, (LONG_PTR)new_proc );
return (LONG)WINPROC_GetProc16( (WNDPROC)old_proc, FALSE ); return (LONG)WINPROC_GetProc16( old_proc, FALSE );
} }
else return SetWindowLongA( WIN_Handle32(hwnd), offset, newval ); else return SetWindowLongA( WIN_Handle32(hwnd), offset, newval );
} }
......
...@@ -690,7 +690,7 @@ LONG WINAPI SetClassLong16( HWND16 hwnd16, INT16 offset, LONG newval ) ...@@ -690,7 +690,7 @@ LONG WINAPI SetClassLong16( HWND16 hwnd16, INT16 offset, LONG newval )
{ {
WNDPROC new_proc = WINPROC_AllocProc16( (WNDPROC16)newval ); WNDPROC new_proc = WINPROC_AllocProc16( (WNDPROC16)newval );
WNDPROC old_proc = (WNDPROC)SetClassLongA( WIN_Handle32(hwnd16), offset, (LONG_PTR)new_proc ); WNDPROC old_proc = (WNDPROC)SetClassLongA( WIN_Handle32(hwnd16), offset, (LONG_PTR)new_proc );
return (LONG)WINPROC_GetProc16( (WNDPROC)old_proc, FALSE ); return (LONG)WINPROC_GetProc16( old_proc, FALSE );
} }
case GCLP_MENUNAME: case GCLP_MENUNAME:
newval = (LONG)MapSL( newval ); newval = (LONG)MapSL( newval );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment