mirror of
https://github.com/reactos/wine.git
synced 2024-11-24 20:30:01 +00:00
gdi32: Remove some superfluous casts.
This commit is contained in:
parent
c75a143f3d
commit
ec1c9492b0
@ -73,7 +73,7 @@ static HGLOBAL16 dib_copy(const BITMAPINFO *info, UINT coloruse)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
newInfo = (BITMAPINFO *) GlobalLock16( hmem );
|
||||
newInfo = GlobalLock16( hmem );
|
||||
memcpy( newInfo, info, size );
|
||||
GlobalUnlock16( hmem );
|
||||
return hmem;
|
||||
@ -134,7 +134,7 @@ HBRUSH WINAPI CreateBrushIndirect( const LOGBRUSH * brush )
|
||||
HGLOBAL h = (HGLOBAL)ptr->logbrush.lbHatch;
|
||||
|
||||
ptr->logbrush.lbStyle = BS_DIBPATTERN;
|
||||
if (!(bmi = (BITMAPINFO *)GlobalLock( h ))) goto error;
|
||||
if (!(bmi = GlobalLock( h ))) goto error;
|
||||
ptr->logbrush.lbHatch = dib_copy( bmi, ptr->logbrush.lbColor);
|
||||
GlobalUnlock( h );
|
||||
if (!ptr->logbrush.lbHatch) goto error;
|
||||
|
@ -752,7 +752,7 @@ INT16 WINAPI Escape16( HDC16 hdc, INT16 escape, INT16 in_count, SEGPTR in_data,
|
||||
case DRAWPATTERNRECT:
|
||||
{
|
||||
DRAWPATRECT pr;
|
||||
DRAWPATRECT16 *pr16 = (DRAWPATRECT16*)MapSL(in_data);
|
||||
DRAWPATRECT16 *pr16 = MapSL(in_data);
|
||||
|
||||
pr.ptPosition.x = pr16->ptPosition.x;
|
||||
pr.ptPosition.y = pr16->ptPosition.y;
|
||||
@ -1770,9 +1770,9 @@ void WINAPI PlayMetaFileRecord16( HDC16 hdc, HANDLETABLE16 *ht, METARECORD *mr,
|
||||
HANDLETABLE *ht32 = HeapAlloc( GetProcessHeap(), 0, handles * sizeof(*ht32) );
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < handles; i++) ht32->objectHandle[i] = (HGDIOBJ)(ULONG_PTR)ht->objectHandle[i];
|
||||
for (i = 0; i < handles; i++) ht32->objectHandle[i] = HGDIOBJ_32(ht->objectHandle[i]);
|
||||
PlayMetaFileRecord( HDC_32(hdc), ht32, mr, handles );
|
||||
for (i = 0; i < handles; i++) ht->objectHandle[i] = LOWORD(ht32->objectHandle[i]);
|
||||
for (i = 0; i < handles; i++) ht->objectHandle[i] = HGDIOBJ_16(ht32->objectHandle[i]);
|
||||
HeapFree( GetProcessHeap(), 0, ht32 );
|
||||
}
|
||||
|
||||
|
@ -244,7 +244,7 @@ BOOL16 WINAPI EnumMetaFile16( HDC16 hdc16, HMETAFILE16 hmf,
|
||||
SelectObject(hdc, hPen);
|
||||
SelectObject(hdc, hFont);
|
||||
|
||||
ht = (HANDLETABLE16 *)GlobalLock16(hHT);
|
||||
ht = GlobalLock16(hHT);
|
||||
|
||||
/* free objects in handle table */
|
||||
for(i = 0; i < mh->mtNoObjects; i++)
|
||||
@ -309,5 +309,5 @@ HMETAFILE16 WINAPI SetMetaFileBitsBetter16( HMETAFILE16 hMeta )
|
||||
{
|
||||
if( IsValidMetaFile16( hMeta ) )
|
||||
return GlobalReAlloc16( hMeta, 0, GMEM_SHARE | GMEM_NODISCARD | GMEM_MODIFY);
|
||||
return (HMETAFILE16)0;
|
||||
return 0;
|
||||
}
|
||||
|
@ -357,7 +357,7 @@ static int CreateSpoolFile(LPCSTR pszOutput)
|
||||
signal( SIGPIPE, SIG_DFL );
|
||||
signal( SIGCHLD, SIG_DFL );
|
||||
|
||||
execl("/bin/sh", "/bin/sh", "-c", psCmdP, (char*)0);
|
||||
execl("/bin/sh", "/bin/sh", "-c", psCmdP, NULL);
|
||||
_exit(1);
|
||||
|
||||
}
|
||||
|
@ -2212,11 +2212,11 @@ static void test_clipping(void)
|
||||
|
||||
bmpDst = CreateDIBSection( hdcDst, &bmpinfo, DIB_RGB_COLORS, &bits, NULL, 0 );
|
||||
ok(bmpDst != NULL, "Couldn't create destination bitmap\n");
|
||||
oldDst = (HBITMAP)SelectObject( hdcDst, bmpDst );
|
||||
oldDst = SelectObject( hdcDst, bmpDst );
|
||||
|
||||
bmpSrc = CreateDIBSection( hdcSrc, &bmpinfo, DIB_RGB_COLORS, &bits, NULL, 0 );
|
||||
ok(bmpSrc != NULL, "Couldn't create source bitmap\n");
|
||||
oldSrc = (HBITMAP)SelectObject( hdcSrc, bmpSrc );
|
||||
oldSrc = SelectObject( hdcSrc, bmpSrc );
|
||||
|
||||
result = BitBlt( hdcDst, 0, 0, 100, 100, hdcSrc, 100, 100, SRCCOPY );
|
||||
ok(result, "BitBlt failed\n");
|
||||
|
Loading…
Reference in New Issue
Block a user