Mikhail Maroukhine : d3dx9_36: Fix compiler warnings with flag -Wcast-qual.
Alexandre Julliard
julliard at winehq.org
Mon Mar 29 09:57:54 CDT 2010
Module: wine
Branch: master
Commit: adf09ce66e70a5cc3235d726759f0ea2ef203d13
URL: http://source.winehq.org/git/wine.git/?a=commit;h=adf09ce66e70a5cc3235d726759f0ea2ef203d13
Author: Mikhail Maroukhine <mikolg at yandex.ru>
Date: Sat Mar 27 15:55:51 2010 +0600
d3dx9_36: Fix compiler warnings with flag -Wcast-qual.
---
dlls/d3dx9_36/mesh.c | 6 +++---
dlls/d3dx9_36/shader.c | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c
index 91116b2..f90de85 100644
--- a/dlls/d3dx9_36/mesh.c
+++ b/dlls/d3dx9_36/mesh.c
@@ -117,7 +117,7 @@ HRESULT WINAPI D3DXComputeBoundingBox(CONST D3DXVECTOR3 *pfirstposition, DWORD n
for(i=0; i<numvertices; i++)
{
- vec = *( (D3DXVECTOR3*)((char*)pfirstposition + dwstride * i) );
+ vec = *( (const D3DXVECTOR3*)((const char*)pfirstposition + dwstride * i) );
if ( vec.x < pmin->x ) pmin->x = vec.x;
if ( vec.x > pmax->x ) pmax->x = vec.x;
@@ -152,7 +152,7 @@ HRESULT WINAPI D3DXComputeBoundingSphere(CONST D3DXVECTOR3* pfirstposition, DWOR
for(i=0; i<numvertices; i++)
{
- D3DXVec3Add(&temp1, &temp, (D3DXVECTOR3*)((char*)pfirstposition + dwstride * i));
+ D3DXVec3Add(&temp1, &temp, (const D3DXVECTOR3*)((const char*)pfirstposition + dwstride * i));
temp = temp1;
}
@@ -160,7 +160,7 @@ HRESULT WINAPI D3DXComputeBoundingSphere(CONST D3DXVECTOR3* pfirstposition, DWOR
for(i=0; i<numvertices; i++)
{
- d = D3DXVec3Length(D3DXVec3Subtract(&temp, (D3DXVECTOR3*)((char*)pfirstposition + dwstride * i), pcenter));
+ d = D3DXVec3Length(D3DXVec3Subtract(&temp, (const D3DXVECTOR3*)((const char*)pfirstposition + dwstride * i), pcenter));
if ( d > *pradius ) *pradius = d;
}
return D3D_OK;
diff --git a/dlls/d3dx9_36/shader.c b/dlls/d3dx9_36/shader.c
index 1b888a7..ab57029 100644
--- a/dlls/d3dx9_36/shader.c
+++ b/dlls/d3dx9_36/shader.c
@@ -608,7 +608,7 @@ HRESULT WINAPI D3DXGetShaderConstantTableEx(CONST DWORD* byte_code,
HRESULT hr;
LPCVOID data;
UINT size;
- D3DXSHADER_CONSTANTTABLE* ctab_header;
+ const D3DXSHADER_CONSTANTTABLE* ctab_header;
FIXME("(%p, %x, %p): semi-stub\n", byte_code, flags, constant_table);
@@ -642,7 +642,7 @@ HRESULT WINAPI D3DXGetShaderConstantTableEx(CONST DWORD* byte_code,
object->size = size;
memcpy(object->ctab, data, object->size);
- ctab_header = (D3DXSHADER_CONSTANTTABLE*)data;
+ ctab_header = (const D3DXSHADER_CONSTANTTABLE*)data;
if (ctab_header->Size != sizeof(D3DXSHADER_CONSTANTTABLE))
goto error;
object->desc.Creator = ctab_header->Creator ? (LPCSTR)object->ctab + ctab_header->Creator : NULL;
More information about the wine-cvs
mailing list