Commit 9cf78880 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Fix some cast-qual warnings.

parent 95d9b127
......@@ -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:
......
......@@ -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;
......
......@@ -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:
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment