Henri Verbeet : wined3d: Eliminate a redundant local variable in get_loop_control_const().

Alexandre Julliard julliard at winehq.org
Wed Jun 24 09:22:56 CDT 2009


Module: wine
Branch: master
Commit: 943ed4e1e969f40a31dc39e4cb9dc3232e22efb8
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=943ed4e1e969f40a31dc39e4cb9dc3232e22efb8

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Wed Jun 24 10:54:18 2009 +0200

wined3d: Eliminate a redundant local variable in get_loop_control_const().

---

 dlls/wined3d/arb_program_shader.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index a420abf..df2fa52 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -4363,15 +4363,14 @@ static void get_loop_control_const(const struct wined3d_shader_instruction *ins,
         IWineD3DBaseShaderImpl *This, UINT idx, struct loop_control *loop_control)
 {
     BOOL vshader = shader_is_vshader_version(This->baseShader.reg_maps.shader_version.type);
-    WORD flag = (1 << idx);
-    const local_constant *constant;
     struct shader_arb_ctx_priv *priv = ins->ctx->backend_data;
 
     /* Integer constants can either be a local constant, or they can be stored in the shader
-     * type specific compile args
-     */
-    if(This->baseShader.reg_maps.local_int_consts & flag)
+     * type specific compile args. */
+    if (This->baseShader.reg_maps.local_int_consts & (1 << idx))
     {
+        const local_constant *constant;
+
         LIST_FOR_EACH_ENTRY(constant, &This->baseShader.constantsI, local_constant, entry)
         {
             if (constant->idx == idx)




More information about the wine-cvs mailing list