wined3d: Cast-qual warnings fix.

This commit is contained in:
Andrew Talbot 2006-11-24 14:15:16 +00:00 committed by Alexandre Julliard
parent f3a515ce19
commit 92dc74016a
2 changed files with 12 additions and 6 deletions

View File

@ -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;
}

View File

@ -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;
}