Commit 92dc7401 authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

wined3d: Cast-qual warnings fix.

parent f3a515ce
......@@ -938,9 +938,12 @@ static HRESULT WINAPI IWineD3DPixelShaderImpl_SetFunction(IWineD3DPixelShader *i
TRACE("(%p) : Copying the function\n", This);
if (NULL != pFunction) {
This->baseShader.function = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, This->baseShader.functionLength);
if (!This->baseShader.function) return E_OUTOFMEMORY;
memcpy((void *)This->baseShader.function, pFunction, This->baseShader.functionLength);
void *function;
function = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, This->baseShader.functionLength);
if (!function) return E_OUTOFMEMORY;
memcpy(function, pFunction, This->baseShader.functionLength);
This->baseShader.function = function;
} else {
This->baseShader.function = NULL;
}
......
......@@ -1214,9 +1214,12 @@ static HRESULT WINAPI IWineD3DVertexShaderImpl_SetFunction(IWineD3DVertexShader
/* copy the function ... because it will certainly be released by application */
if (NULL != pFunction) {
This->baseShader.function = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, This->baseShader.functionLength);
if (!This->baseShader.function) return E_OUTOFMEMORY;
memcpy((void *)This->baseShader.function, pFunction, This->baseShader.functionLength);
void *function;
function = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, This->baseShader.functionLength);
if (!function) return E_OUTOFMEMORY;
memcpy(function, pFunction, This->baseShader.functionLength);
This->baseShader.function = function;
} else {
This->baseShader.function = NULL;
}
......
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