d3dx9_36: Fix compiler warnings with flag -Wcast-qual.
This commit is contained in:
parent
3d62b870a1
commit
adf09ce66e
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue