d3dx9_36: Simplify conditional expression (PVS-Studio).

Signed-off-by: Frédéric Delanoy <frederic.delanoy@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Frédéric Delanoy 2015-10-15 19:51:58 +02:00 committed by Alexandre Julliard
parent 91a4f41712
commit 3cdea7e50e
1 changed files with 2 additions and 2 deletions

View File

@ -1096,7 +1096,7 @@ static UINT set(struct ID3DXConstantTableImpl *table, IDirect3DDevice9 *device,
offset = min(desc->Elements - 1, offset);
last = offset * desc->Rows * desc->Columns;
if ((is_pointer || (!is_pointer && inclass == D3DXPC_MATRIX_ROWS)) && desc->RegisterSet != D3DXRS_BOOL)
if ((is_pointer || inclass == D3DXPC_MATRIX_ROWS) && desc->RegisterSet != D3DXRS_BOOL)
{
set(table, device, &constant->constants[0], NULL, intype, size, incol, inclass, 0, is_pointer);
}
@ -1136,7 +1136,7 @@ static UINT set(struct ID3DXConstantTableImpl *table, IDirect3DDevice9 *device,
* E.g.: struct {int i; int n} s;
* SetValue(device, "s", [1, 2], 8) => s = {1, 0};
*/
else if ((is_pointer || (!is_pointer && inclass == D3DXPC_MATRIX_ROWS)) && desc->RegisterSet != D3DXRS_BOOL)
else if ((is_pointer || inclass == D3DXPC_MATRIX_ROWS) && desc->RegisterSet != D3DXRS_BOOL)
{
last = set(table, device, &constant->constants[0], indata, intype, size, incol, inclass,
index + last, is_pointer);