gdi32: Remove unneeded casts.

This commit is contained in:
Andrew Talbot 2008-01-05 16:44:09 +00:00 committed by Alexandre Julliard
parent 35d3f81e69
commit d0d4c74e85
7 changed files with 11 additions and 13 deletions

View File

@ -471,7 +471,7 @@ BOOL16 WINAPI SetSolidBrush16(HBRUSH16 hBrush, COLORREF newColor )
BRUSHOBJ * brushPtr;
BOOL16 res = FALSE;
TRACE("(hBrush %04x, newColor %08x)\n", hBrush, (DWORD)newColor);
TRACE("(hBrush %04x, newColor %08x)\n", hBrush, newColor);
if (!(brushPtr = (BRUSHOBJ *) GDI_GetObjPtr( HBRUSH_32(hBrush), BRUSH_MAGIC )))
return FALSE;

View File

@ -832,7 +832,7 @@ INT WINAPI GetDIBits(
*dstbits++ = (BYTE)(((val >> 2) & 0xf8) | ((val >> 7) & 0x07));
*dstbits++ = (BYTE)(((val >> 7) & 0xf8) | ((val >> 12) & 0x07));
}
dstbits = (LPBYTE)(dbits+=dstwidthb);
dstbits = dbits+=dstwidthb;
srcbits = (LPWORD)(sbits+=srcwidthb);
}
}
@ -848,7 +848,7 @@ INT WINAPI GetDIBits(
case 32: /* 32 bpp srcDIB -> 24 bpp dstDIB */
{
LPBYTE srcbits = (LPBYTE)sbits;
LPBYTE srcbits = sbits;
width = min(srcwidth, dstwidth);
for( y = 0; y < lines; y++) {
@ -857,8 +857,8 @@ INT WINAPI GetDIBits(
*dstbits++ = *srcbits++;
*dstbits++ = *srcbits++;
}
dstbits=(LPBYTE)(dbits+=dstwidthb);
srcbits = (LPBYTE)(sbits+=srcwidthb);
dstbits = dbits+=dstwidthb;
srcbits = sbits+=srcwidthb;
}
}
break;

View File

@ -2545,7 +2545,7 @@ static INT CALLBACK cbEnhPaletteCopy( HDC a,
/* Update the passed data as a return code */
info->lpPe = NULL; /* Palettes were copied! */
info->cEntries = (UINT)dwNumPalToCopy;
info->cEntries = dwNumPalToCopy;
return FALSE; /* That's all we need */
}
@ -2576,7 +2576,7 @@ UINT WINAPI GetEnhMetaFilePaletteEntries( HENHMETAFILE hEmf,
if ( enhHeader->nPalEntries == 0 ) return 0;
/* Is the user requesting the number of palettes? */
if ( lpPe == NULL ) return (UINT)enhHeader->nPalEntries;
if ( lpPe == NULL ) return enhHeader->nPalEntries;
/* Copy cEntries worth of PALETTEENTRY structs into the buffer */
infoForCallBack.cEntries = cEntries;

View File

@ -3291,7 +3291,7 @@ static void GetEnumStructs(Face *face, LPENUMLOGFONTEXW pelf,
if(size) {
potm = HeapAlloc(GetProcessHeap(), 0, size);
WineEngGetOutlineTextMetrics(font, size, potm);
ptm = (TEXTMETRICW*)&potm->otmTextMetrics;
ptm = &potm->otmTextMetrics;
} else {
WineEngGetTextMetrics(font, &tm);
ptm = &tm;

View File

@ -1271,7 +1271,7 @@ static BOOL MF_Play_MetaExtTextOut(HDC hdc, METARECORD *mr)
{
dxx = (LPINT16)(sot+(((s1+1)>>1)*2));
dx = HeapAlloc( GetProcessHeap(), 0, s1*sizeof(INT));
if (dx) for (i = 0; i < s1; i++) dx[i] = (SHORT)dxx[i];
if (dx) for (i = 0; i < s1; i++) dx[i] = dxx[i];
}
else {
TRACE("%s len: %d\n", sot, mr->rdSize);

View File

@ -308,8 +308,6 @@ HMETAFILE16 WINAPI SetMetaFileBits16( HGLOBAL16 hMem )
HMETAFILE16 WINAPI SetMetaFileBitsBetter16( HMETAFILE16 hMeta )
{
if( IsValidMetaFile16( hMeta ) )
return (HMETAFILE16)GlobalReAlloc16( hMeta, 0,
GMEM_SHARE | GMEM_NODISCARD | GMEM_MODIFY);
return GlobalReAlloc16( hMeta, 0, GMEM_SHARE | GMEM_NODISCARD | GMEM_MODIFY);
return (HMETAFILE16)0;
}

View File

@ -327,7 +327,7 @@ HPQ16 WINAPI CreatePQ16(INT16 size)
*/
INT16 WINAPI DeletePQ16(HPQ16 hPQ)
{
return GlobalFree16((HGLOBAL16)hPQ);
return GlobalFree16(hPQ);
}
/**********************************************************************