gdi32: Remove superfluous pointer casts.
This commit is contained in:
parent
07a7c1f822
commit
667a1ed5be
|
@ -270,7 +270,7 @@ HBRUSH WINAPI CreateDIBPatternBrush( HGLOBAL hbitmap, UINT coloruse )
|
||||||
*/
|
*/
|
||||||
HBRUSH WINAPI CreateDIBPatternBrushPt( const void* data, UINT coloruse )
|
HBRUSH WINAPI CreateDIBPatternBrushPt( const void* data, UINT coloruse )
|
||||||
{
|
{
|
||||||
const BITMAPINFO *info=(const BITMAPINFO*)data;
|
const BITMAPINFO *info=data;
|
||||||
LOGBRUSH logbrush;
|
LOGBRUSH logbrush;
|
||||||
|
|
||||||
if (!data)
|
if (!data)
|
||||||
|
|
|
@ -382,7 +382,7 @@ static HDC GetDCState( HDC hdc )
|
||||||
newdc->vportExtY = dc->vportExtY;
|
newdc->vportExtY = dc->vportExtY;
|
||||||
newdc->BoundsRect = dc->BoundsRect;
|
newdc->BoundsRect = dc->BoundsRect;
|
||||||
|
|
||||||
newdc->hSelf = (HDC)handle;
|
newdc->hSelf = handle;
|
||||||
newdc->thread = GetCurrentThreadId();
|
newdc->thread = GetCurrentThreadId();
|
||||||
newdc->refcount = 1;
|
newdc->refcount = 1;
|
||||||
newdc->saveLevel = 0;
|
newdc->saveLevel = 0;
|
||||||
|
|
|
@ -616,8 +616,8 @@ INT WINAPI GetDIBits(
|
||||||
}
|
}
|
||||||
|
|
||||||
colorPtr = (LPBYTE) info + (WORD) info->bmiHeader.biSize;
|
colorPtr = (LPBYTE) info + (WORD) info->bmiHeader.biSize;
|
||||||
rgbTriples = (RGBTRIPLE *) colorPtr;
|
rgbTriples = colorPtr;
|
||||||
rgbQuads = (RGBQUAD *) colorPtr;
|
rgbQuads = colorPtr;
|
||||||
|
|
||||||
/* Transfer color info */
|
/* Transfer color info */
|
||||||
|
|
||||||
|
|
|
@ -2600,8 +2600,7 @@ static INT CALLBACK cbEnhPaletteCopy( HDC a,
|
||||||
|
|
||||||
TRACE( "copying 0x%08x palettes\n", dwNumPalToCopy );
|
TRACE( "copying 0x%08x palettes\n", dwNumPalToCopy );
|
||||||
|
|
||||||
memcpy( (LPVOID)info->lpPe,
|
memcpy( info->lpPe, (LPCSTR)lpEof + lpEof->offPalEntries,
|
||||||
(LPCVOID)(((LPCSTR)lpEof) + lpEof->offPalEntries),
|
|
||||||
sizeof( *(info->lpPe) ) * dwNumPalToCopy );
|
sizeof( *(info->lpPe) ) * dwNumPalToCopy );
|
||||||
|
|
||||||
/* Update the passed data as a return code */
|
/* Update the passed data as a return code */
|
||||||
|
|
|
@ -197,7 +197,7 @@ BOOL EMFDRV_WriteRecord( PHYSDEV dev, EMR *emr )
|
||||||
physDev->emh->nRecords++;
|
physDev->emh->nRecords++;
|
||||||
|
|
||||||
if(physDev->hFile) {
|
if(physDev->hFile) {
|
||||||
if (!WriteFile(physDev->hFile, (char *)emr, emr->nSize, NULL, NULL))
|
if (!WriteFile(physDev->hFile, emr, emr->nSize, NULL, NULL))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
} else {
|
} else {
|
||||||
DWORD nEmfSize = HeapSize(GetProcessHeap(), 0, physDev->emh);
|
DWORD nEmfSize = HeapSize(GetProcessHeap(), 0, physDev->emh);
|
||||||
|
@ -407,7 +407,7 @@ HDC WINAPI CreateEnhMetaFileW(
|
||||||
EMFDRV_DeleteDC( dc );
|
EMFDRV_DeleteDC( dc );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (!WriteFile( hFile, (LPSTR)physDev->emh, size, NULL, NULL )) {
|
if (!WriteFile( hFile, physDev->emh, size, NULL, NULL )) {
|
||||||
EMFDRV_DeleteDC( dc );
|
EMFDRV_DeleteDC( dc );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -482,8 +482,8 @@ HENHMETAFILE WINAPI CloseEnhMetaFile(HDC hdc) /* [in] metafile DC */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!WriteFile(physDev->hFile, (LPSTR)physDev->emh,
|
if (!WriteFile(physDev->hFile, physDev->emh, sizeof(*physDev->emh),
|
||||||
sizeof(*physDev->emh), NULL, NULL))
|
NULL, NULL))
|
||||||
{
|
{
|
||||||
CloseHandle( physDev->hFile );
|
CloseHandle( physDev->hFile );
|
||||||
EMFDRV_DeleteDC( dc );
|
EMFDRV_DeleteDC( dc );
|
||||||
|
|
|
@ -920,8 +920,8 @@ BOOL WINAPI GetTextExtentExPointI( HDC hdc, const WORD *indices, INT count, INT
|
||||||
}
|
}
|
||||||
else if(dc->funcs->pGetTextExtentExPoint) {
|
else if(dc->funcs->pGetTextExtentExPoint) {
|
||||||
FIXME("calling GetTextExtentExPoint\n");
|
FIXME("calling GetTextExtentExPoint\n");
|
||||||
ret = dc->funcs->pGetTextExtentExPoint( dc->physDev, (LPCWSTR)indices,
|
ret = dc->funcs->pGetTextExtentExPoint( dc->physDev, indices, count,
|
||||||
count, max_ext, nfit, dxs, size );
|
max_ext, nfit, dxs, size );
|
||||||
}
|
}
|
||||||
|
|
||||||
release_dc_ptr( dc );
|
release_dc_ptr( dc );
|
||||||
|
|
|
@ -4037,7 +4037,7 @@ static INT GSUB_is_glyph_covered(LPCVOID table , UINT glyph)
|
||||||
{
|
{
|
||||||
const GSUB_CoverageFormat1* cf1;
|
const GSUB_CoverageFormat1* cf1;
|
||||||
|
|
||||||
cf1 = (GSUB_CoverageFormat1*)table;
|
cf1 = table;
|
||||||
|
|
||||||
if (GET_BE_WORD(cf1->CoverageFormat) == 1)
|
if (GET_BE_WORD(cf1->CoverageFormat) == 1)
|
||||||
{
|
{
|
||||||
|
@ -4806,7 +4806,7 @@ DWORD WineEngGetGlyphOutline(GdiFont *incoming_font, UINT glyph, UINT format,
|
||||||
if (!buf || !buflen) break;
|
if (!buf || !buflen) break;
|
||||||
|
|
||||||
memset(buf, 0, buflen);
|
memset(buf, 0, buflen);
|
||||||
dst = (unsigned int *)buf;
|
dst = buf;
|
||||||
rgb = (format == WINE_GGO_HRGB_BITMAP || format == WINE_GGO_VRGB_BITMAP);
|
rgb = (format == WINE_GGO_HRGB_BITMAP || format == WINE_GGO_VRGB_BITMAP);
|
||||||
|
|
||||||
if ( needsTransform )
|
if ( needsTransform )
|
||||||
|
|
|
@ -804,8 +804,8 @@ BOOL WINAPI PlayMetaFileRecord( HDC hdc, HANDLETABLE *ht, METARECORD *mr, UINT
|
||||||
infohdr->biHeight,
|
infohdr->biHeight,
|
||||||
infohdr->biPlanes,
|
infohdr->biPlanes,
|
||||||
infohdr->biBitCount,
|
infohdr->biBitCount,
|
||||||
(LPSTR)(mr->rdParm +
|
mr->rdParm +
|
||||||
(sizeof(BITMAPINFOHEADER) / 2) + 4))));
|
(sizeof(BITMAPINFOHEADER) / 2) + 4)));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BS_DIBPATTERN:
|
case BS_DIBPATTERN:
|
||||||
|
@ -928,7 +928,7 @@ BOOL WINAPI PlayMetaFileRecord( HDC hdc, HANDLETABLE *ht, METARECORD *mr, UINT
|
||||||
mr->rdParm[11], /*Height*/
|
mr->rdParm[11], /*Height*/
|
||||||
mr->rdParm[13], /*Planes*/
|
mr->rdParm[13], /*Planes*/
|
||||||
mr->rdParm[14], /*BitsPixel*/
|
mr->rdParm[14], /*BitsPixel*/
|
||||||
(LPSTR)&mr->rdParm[15]); /*bits*/
|
&mr->rdParm[15]); /*bits*/
|
||||||
SelectObject(hdcSrc,hbitmap);
|
SelectObject(hdcSrc,hbitmap);
|
||||||
StretchBlt(hdc, (SHORT)mr->rdParm[9], (SHORT)mr->rdParm[8],
|
StretchBlt(hdc, (SHORT)mr->rdParm[9], (SHORT)mr->rdParm[8],
|
||||||
(SHORT)mr->rdParm[7], (SHORT)mr->rdParm[6],
|
(SHORT)mr->rdParm[7], (SHORT)mr->rdParm[6],
|
||||||
|
@ -946,7 +946,7 @@ BOOL WINAPI PlayMetaFileRecord( HDC hdc, HANDLETABLE *ht, METARECORD *mr, UINT
|
||||||
mr->rdParm[8]/*Height*/,
|
mr->rdParm[8]/*Height*/,
|
||||||
mr->rdParm[10]/*Planes*/,
|
mr->rdParm[10]/*Planes*/,
|
||||||
mr->rdParm[11]/*BitsPixel*/,
|
mr->rdParm[11]/*BitsPixel*/,
|
||||||
(LPSTR)&mr->rdParm[12]/*bits*/);
|
&mr->rdParm[12]/*bits*/);
|
||||||
SelectObject(hdcSrc,hbitmap);
|
SelectObject(hdcSrc,hbitmap);
|
||||||
BitBlt(hdc,(SHORT)mr->rdParm[6],(SHORT)mr->rdParm[5],
|
BitBlt(hdc,(SHORT)mr->rdParm[6],(SHORT)mr->rdParm[5],
|
||||||
(SHORT)mr->rdParm[4],(SHORT)mr->rdParm[3],
|
(SHORT)mr->rdParm[4],(SHORT)mr->rdParm[3],
|
||||||
|
|
|
@ -339,8 +339,8 @@ static DC *MFDRV_CloseMetaFile( HDC hdc )
|
||||||
}
|
}
|
||||||
|
|
||||||
physDev->mh->mtType = METAFILE_MEMORY; /* This is what windows does */
|
physDev->mh->mtType = METAFILE_MEMORY; /* This is what windows does */
|
||||||
if (!WriteFile(physDev->hFile, (LPSTR)physDev->mh,
|
if (!WriteFile(physDev->hFile, physDev->mh, sizeof(*physDev->mh),
|
||||||
sizeof(*physDev->mh), NULL, NULL)) {
|
NULL, NULL)) {
|
||||||
MFDRV_DeleteDC( dc );
|
MFDRV_DeleteDC( dc );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -457,7 +457,7 @@ BOOL MFDRV_WriteRecord( PHYSDEV dev, METARECORD *mr, DWORD rlen)
|
||||||
break;
|
break;
|
||||||
case METAFILE_DISK:
|
case METAFILE_DISK:
|
||||||
TRACE("Writing record to disk\n");
|
TRACE("Writing record to disk\n");
|
||||||
if (!WriteFile(physDev->hFile, (char *)mr, rlen, NULL, NULL))
|
if (!WriteFile(physDev->hFile, mr, rlen, NULL, NULL))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -520,7 +520,7 @@ HPALETTE CDECL MFDRV_SelectPalette( PHYSDEV dev, HPALETTE hPalette, BOOL bForceB
|
||||||
BOOL creationSucceed;
|
BOOL creationSucceed;
|
||||||
int sizeofPalette;
|
int sizeofPalette;
|
||||||
|
|
||||||
GetObjectA(hPalette, sizeof(WORD), (LPSTR) &wNumEntries);
|
GetObjectA(hPalette, sizeof(WORD), &wNumEntries);
|
||||||
|
|
||||||
if (wNumEntries == 0) return 0;
|
if (wNumEntries == 0) return 0;
|
||||||
|
|
||||||
|
|
|
@ -1430,8 +1430,7 @@ static void REGION_CopyRegion(WINEREGION *dst, WINEREGION *src)
|
||||||
dst->extents.top = src->extents.top;
|
dst->extents.top = src->extents.top;
|
||||||
dst->extents.right = src->extents.right;
|
dst->extents.right = src->extents.right;
|
||||||
dst->extents.bottom = src->extents.bottom;
|
dst->extents.bottom = src->extents.bottom;
|
||||||
memcpy((char *) dst->rects, (char *) src->rects,
|
memcpy(dst->rects, src->rects, src->numRects * sizeof(RECT));
|
||||||
(int) (src->numRects * sizeof(RECT)));
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -110,7 +110,7 @@ struct hgdiobj_event
|
||||||
static DWORD WINAPI thread_proc(void *param)
|
static DWORD WINAPI thread_proc(void *param)
|
||||||
{
|
{
|
||||||
LOGPEN lp;
|
LOGPEN lp;
|
||||||
struct hgdiobj_event *hgdiobj_event = (struct hgdiobj_event *)param;
|
struct hgdiobj_event *hgdiobj_event = param;
|
||||||
|
|
||||||
hgdiobj_event->hdc = CreateDC("display", NULL, NULL, NULL);
|
hgdiobj_event->hdc = CreateDC("display", NULL, NULL, NULL);
|
||||||
ok(hgdiobj_event->hdc != NULL, "CreateDC error %u\n", GetLastError());
|
ok(hgdiobj_event->hdc != NULL, "CreateDC error %u\n", GetLastError());
|
||||||
|
|
Loading…
Reference in New Issue