wined3d: Fix some cast-qual warnings.

This commit is contained in:
Henri Verbeet 2009-07-09 09:56:11 +02:00 committed by Alexandre Julliard
parent 95d9b1271f
commit 9cf7888002
4 changed files with 9 additions and 9 deletions

View File

@ -750,7 +750,7 @@ HRESULT shader_get_registers_used(IWineD3DBaseShader *iface, const struct wined3
}
reg_maps->loop_depth = max_loop_depth;
This->baseShader.functionLength = ((char *)pToken - (char *)byte_code);
This->baseShader.functionLength = ((const char *)pToken - (const char *)byte_code);
return WINED3D_OK;
}
@ -925,13 +925,13 @@ static void shader_dump_register(const struct wined3d_shader_register *reg,
switch (reg->immconst_type)
{
case WINED3D_IMMCONST_FLOAT:
TRACE("%.8e", *(float *)reg->immconst_data);
TRACE("%.8e", *(const float *)reg->immconst_data);
break;
case WINED3D_IMMCONST_FLOAT4:
TRACE("%.8e, %.8e, %.8e, %.8e",
*(float *)&reg->immconst_data[0], *(float *)&reg->immconst_data[1],
*(float *)&reg->immconst_data[2], *(float *)&reg->immconst_data[3]);
*(const float *)&reg->immconst_data[0], *(const float *)&reg->immconst_data[1],
*(const float *)&reg->immconst_data[2], *(const float *)&reg->immconst_data[3]);
break;
default:

View File

@ -577,7 +577,7 @@ static ULONG STDMETHODCALLTYPE buffer_AddRef(IWineD3DBuffer *iface)
}
/* Context activation is done by the caller. */
const BYTE *buffer_get_sysmem(struct wined3d_buffer *This)
BYTE *buffer_get_sysmem(struct wined3d_buffer *This)
{
/* AllocatedMemory exists if the buffer is double buffered or has no buffer object at all */
if(This->resource.allocatedMemory) return This->resource.allocatedMemory;

View File

@ -1335,13 +1335,13 @@ static void shader_glsl_get_register_name(const struct wined3d_shader_register *
switch (reg->immconst_type)
{
case WINED3D_IMMCONST_FLOAT:
sprintf(register_name, "%.8e", *(float *)reg->immconst_data);
sprintf(register_name, "%.8e", *(const float *)reg->immconst_data);
break;
case WINED3D_IMMCONST_FLOAT4:
sprintf(register_name, "vec4(%.8e, %.8e, %.8e, %.8e)",
*(float *)&reg->immconst_data[0], *(float *)&reg->immconst_data[1],
*(float *)&reg->immconst_data[2], *(float *)&reg->immconst_data[3]);
*(const float *)&reg->immconst_data[0], *(const float *)&reg->immconst_data[1],
*(const float *)&reg->immconst_data[2], *(const float *)&reg->immconst_data[3]);
break;
default:

View File

@ -2395,7 +2395,7 @@ struct wined3d_buffer
extern const IWineD3DBufferVtbl wined3d_buffer_vtbl;
const BYTE *buffer_get_memory(IWineD3DBuffer *iface, UINT offset, GLuint *buffer_object);
const BYTE *buffer_get_sysmem(struct wined3d_buffer *This);
BYTE *buffer_get_sysmem(struct wined3d_buffer *This);
/* IWineD3DRendertargetView */
struct wined3d_rendertarget_view