From 3cdea7e50e476b853b9ac0abbd9903e811ba989b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Delanoy?= Date: Thu, 15 Oct 2015 19:51:58 +0200 Subject: [PATCH] d3dx9_36: Simplify conditional expression (PVS-Studio). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Frédéric Delanoy Signed-off-by: Matteo Bruni Signed-off-by: Alexandre Julliard --- dlls/d3dx9_36/shader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/d3dx9_36/shader.c b/dlls/d3dx9_36/shader.c index 12d0bcbba10..e9d893bde69 100644 --- a/dlls/d3dx9_36/shader.c +++ b/dlls/d3dx9_36/shader.c @@ -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);