From 0b15963b4edf7cdf53b5b5162fc48fa0c424a1a2 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Tue, 14 Sep 2010 13:38:40 +0200 Subject: [PATCH] wined3d: Get rid of redundant comparisons against FALSE. --- dlls/wined3d/arb_program_shader.c | 2 +- dlls/wined3d/swapchain.c | 3 ++- dlls/wined3d/swapchain_gdi.c | 3 ++- dlls/wined3d/utils.c | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index c1927b05948..05ff01213af 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -5313,7 +5313,7 @@ static void shader_arb_handle_instruction(const struct wined3d_shader_instructio bool_const = get_bool_const(ins, This, ins->src[0].reg.idx); if(ins->src[0].modifiers == WINED3DSPSM_NOT) bool_const = !bool_const; - if(!priv->muted && bool_const == FALSE) + if (!priv->muted && !bool_const) { shader_addline(buffer, "#if(FALSE){\n"); priv->muted = TRUE; diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index c9ec8157759..35558adadaa 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -81,7 +81,8 @@ static void WINAPI IWineD3DSwapChainImpl_Destroy(IWineD3DSwapChain *iface) * this will be the original desktop resolution. In case of d3d7 this will be a NOP because ddraw sets the resolution * before starting up Direct3D, thus orig_width and orig_height will be equal to the modes in the presentation params */ - if(This->presentParms.Windowed == FALSE && This->presentParms.AutoRestoreDisplayMode) { + if (!This->presentParms.Windowed && This->presentParms.AutoRestoreDisplayMode) + { mode.Width = This->orig_width; mode.Height = This->orig_height; mode.RefreshRate = 0; diff --git a/dlls/wined3d/swapchain_gdi.c b/dlls/wined3d/swapchain_gdi.c index 250485b06a3..8920caec85c 100644 --- a/dlls/wined3d/swapchain_gdi.c +++ b/dlls/wined3d/swapchain_gdi.c @@ -65,7 +65,8 @@ static void WINAPI IWineGDISwapChainImpl_Destroy(IWineD3DSwapChain *iface) * this will be the original desktop resolution. In case of d3d7 this will be a NOP because ddraw sets the resolution * before starting up Direct3D, thus orig_width and orig_height will be equal to the modes in the presentation params */ - if(This->presentParms.Windowed == FALSE && This->presentParms.AutoRestoreDisplayMode) { + if (!This->presentParms.Windowed && This->presentParms.AutoRestoreDisplayMode) + { mode.Width = This->orig_width; mode.Height = This->orig_height; mode.RefreshRate = 0; diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 6cc154ec504..8760ce6bd75 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -2880,7 +2880,8 @@ void gen_ffp_frag_op(IWineD3DStateBlockImpl *stateblock, struct ffp_frag_setting memset(&settings->op[i], 0xff, sizeof(settings->op[i])); } - if(stateblock->renderState[WINED3DRS_FOGENABLE] == FALSE) { + if (!stateblock->renderState[WINED3DRS_FOGENABLE]) + { settings->fog = FOG_OFF; } else if(stateblock->renderState[WINED3DRS_FOGTABLEMODE] == WINED3DFOG_NONE) { if(use_vs(stateblock) || ((IWineD3DVertexDeclarationImpl *) stateblock->vertexDecl)->position_transformed) {