From 35c3bfe25cc38b8cdd6961d594698d0194cf9c59 Mon Sep 17 00:00:00 2001 From: Andrew Talbot Date: Wed, 23 Jan 2008 21:40:05 +0000 Subject: [PATCH] wined3d: Remove unneeded casts. --- dlls/wined3d/texture.c | 2 +- dlls/wined3d/vertexbuffer.c | 8 ++++---- dlls/wined3d/volumetexture.c | 12 ++++++------ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index eb16700324d..fe37e554953 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -287,7 +287,7 @@ static HRESULT WINAPI IWineD3DTextureImpl_GetSurfaceLevel(IWineD3DTexture *iface if (Level < This->baseTexture.levels) { *ppSurfaceLevel = This->surfaces[Level]; - IWineD3DSurface_AddRef((IWineD3DSurface*) This->surfaces[Level]); + IWineD3DSurface_AddRef(This->surfaces[Level]); hr = WINED3D_OK; TRACE("(%p) : returning %p for level %d\n", This, *ppSurfaceLevel, Level); } diff --git a/dlls/wined3d/vertexbuffer.c b/dlls/wined3d/vertexbuffer.c index 24720667f3f..1093addaa5b 100644 --- a/dlls/wined3d/vertexbuffer.c +++ b/dlls/wined3d/vertexbuffer.c @@ -228,11 +228,11 @@ static inline BOOL process_converted_attribute(IWineD3DVertexBufferImpl *This, data = (((DWORD_PTR) attrib->lpData) + offset) % This->stride; attrib_size = WINED3D_ATR_SIZE(type) * WINED3D_ATR_TYPESIZE(type); for(i = 0; i < attrib_size; i++) { - if(This->conv_map[(DWORD_PTR) data + i] != conv_type) { - TRACE("Byte %ld in vertex changed\n", i + (DWORD_PTR) data); - TRACE("It was type %d, is %d now\n", This->conv_map[(DWORD_PTR) data + i], conv_type); + if(This->conv_map[data + i] != conv_type) { + TRACE("Byte %ld in vertex changed\n", i + data); + TRACE("It was type %d, is %d now\n", This->conv_map[data + i], conv_type); ret = TRUE; - This->conv_map[(DWORD_PTR) data + i] = conv_type; + This->conv_map[data + i] = conv_type; } } return ret; diff --git a/dlls/wined3d/volumetexture.c b/dlls/wined3d/volumetexture.c index 61c26266d8f..9cddb4f1a4b 100644 --- a/dlls/wined3d/volumetexture.c +++ b/dlls/wined3d/volumetexture.c @@ -251,7 +251,7 @@ static HRESULT WINAPI IWineD3DVolumeTextureImpl_GetLevelDesc(IWineD3DVolumeTextu IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface; if (Level < This->baseTexture.levels) { TRACE("(%p) Level (%d)\n", This, Level); - return IWineD3DVolume_GetDesc((IWineD3DVolume *) This->volumes[Level], pDesc); + return IWineD3DVolume_GetDesc(This->volumes[Level], pDesc); } else { FIXME("(%p) Level (%d)\n", This, Level); } @@ -260,8 +260,8 @@ static HRESULT WINAPI IWineD3DVolumeTextureImpl_GetLevelDesc(IWineD3DVolumeTextu static HRESULT WINAPI IWineD3DVolumeTextureImpl_GetVolumeLevel(IWineD3DVolumeTexture *iface, UINT Level, IWineD3DVolume** ppVolumeLevel) { IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface; if (Level < This->baseTexture.levels) { - *ppVolumeLevel = (IWineD3DVolume *)This->volumes[Level]; - IWineD3DVolume_AddRef((IWineD3DVolume *) *ppVolumeLevel); + *ppVolumeLevel = This->volumes[Level]; + IWineD3DVolume_AddRef(*ppVolumeLevel); TRACE("(%p) -> level(%d) returning volume@%p\n", This, Level, *ppVolumeLevel); } else { FIXME("(%p) Level(%d) overflow Levels(%d)\n", This, Level, This->baseTexture.levels); @@ -275,7 +275,7 @@ static HRESULT WINAPI IWineD3DVolumeTextureImpl_LockBox(IWineD3DVolumeTexture *i IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface; if (Level < This->baseTexture.levels) { - hr = IWineD3DVolume_LockBox((IWineD3DVolume *)This->volumes[Level], pLockedVolume, pBox, Flags); + hr = IWineD3DVolume_LockBox(This->volumes[Level], pLockedVolume, pBox, Flags); TRACE("(%p) Level (%d) success(%u)\n", This, Level, hr); } else { @@ -290,7 +290,7 @@ static HRESULT WINAPI IWineD3DVolumeTextureImpl_UnlockBox(IWineD3DVolumeTexture IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface; if (Level < This->baseTexture.levels) { - hr = IWineD3DVolume_UnlockBox((IWineD3DVolume*) This->volumes[Level]); + hr = IWineD3DVolume_UnlockBox(This->volumes[Level]); TRACE("(%p) -> level(%d) success(%u)\n", This, Level, hr); } else { @@ -304,7 +304,7 @@ static HRESULT WINAPI IWineD3DVolumeTextureImpl_AddDirtyBox(IWineD3DVolumeTextur IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface; This->baseTexture.dirty = TRUE; TRACE("(%p) : dirtyfication of volume Level (0)\n", This); - return IWineD3DVolume_AddDirtyBox((IWineD3DVolume *) This->volumes[0], pDirtyBox); + return IWineD3DVolume_AddDirtyBox(This->volumes[0], pDirtyBox); } const IWineD3DVolumeTextureVtbl IWineD3DVolumeTexture_Vtbl =