[Bf-blender-cvs] [eb1ae3b788b] filebrowser_redesign: Silence warning (shadowed variable)

Julian Eisel noreply at git.blender.org
Sun Aug 11 23:20:20 CEST 2019


Commit: eb1ae3b788b9d32fe4bcb3bbf906b45a76108c85
Author: Julian Eisel
Date:   Sun Aug 11 22:35:04 2019 +0200
Branches: filebrowser_redesign
https://developer.blender.org/rBeb1ae3b788b9d32fe4bcb3bbf906b45a76108c85

Silence warning (shadowed variable)

===================================================================

M	source/blender/editors/space_file/file_draw.c

===================================================================

diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c
index 18eb0b08912..e231bdfbb89 100644
--- a/source/blender/editors/space_file/file_draw.c
+++ b/source/blender/editors/space_file/file_draw.c
@@ -280,18 +280,19 @@ static void file_draw_preview(uiBlock *block,
   /* border */
   if (use_dropshadow) {
     GPUVertFormat *format = immVertexFormat();
-    uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
-    uint col = GPU_vertformat_attr_add(format, "color", GPU_COMP_F32, 4, GPU_FETCH_FLOAT);
+    uint pos_attr = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
+    uint col_attr = GPU_vertformat_attr_add(format, "color", GPU_COMP_F32, 4, GPU_FETCH_FLOAT);
+
     immBindBuiltinProgram(GPU_SHADER_2D_FLAT_COLOR);
     immBegin(GPU_PRIM_LINE_LOOP, 4);
-    immAttr4f(col, 1.0f, 1.0f, 1.0f, 0.07f);
-    immVertex2f(pos, (float)xco, (float)(yco + ey));
-    immAttr4f(col, 1.0f, 1.0f, 1.0f, 0.10f);
-    immVertex2f(pos, (float)(xco + ex), (float)(yco + ey));
-    immAttr4f(col, 0.0f, 0.0f, 0.0f, 0.15f);
-    immVertex2f(pos, (float)(xco + ex), (float)(yco));
-    immAttr4f(col, 0.0f, 0.0f, 0.0f, 0.2f);
-    immVertex2f(pos, (float)(xco), (float)(yco));
+    immAttr4f(col_attr, 1.0f, 1.0f, 1.0f, 0.07f);
+    immVertex2f(pos_attr, (float)xco, (float)(yco + ey));
+    immAttr4f(col_attr, 1.0f, 1.0f, 1.0f, 0.10f);
+    immVertex2f(pos_attr, (float)(xco + ex), (float)(yco + ey));
+    immAttr4f(col_attr, 0.0f, 0.0f, 0.0f, 0.15f);
+    immVertex2f(pos_attr, (float)(xco + ex), (float)(yco));
+    immAttr4f(col_attr, 0.0f, 0.0f, 0.0f, 0.2f);
+    immVertex2f(pos_attr, (float)(xco), (float)(yco));
     immEnd();
     immUnbindProgram();
   }



More information about the Bf-blender-cvs mailing list