Fix standalone variable shadowing warning.
Introduced in https://chromium-review.googlesource.com/362641
Eventually we'll switch to using the same sets of warnings
for standalone and GN ANGLE.
BUG=angleproject:1441
Change-Id: I6534b9f85b952ddf1d953342cf9c8ddc5de6614e
Reviewed-on: https://chromium-review.googlesource.com/362780
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/compiler/translator/InitializeVariables.cpp b/src/compiler/translator/InitializeVariables.cpp
index a10beb7..21f0093 100644
--- a/src/compiler/translator/InitializeVariables.cpp
+++ b/src/compiler/translator/InitializeVariables.cpp
@@ -158,7 +158,7 @@
TStructure *structure = new TStructure(new TString(var.structName.c_str()), fields);
TType type;
type.setStruct(structure);
- for (int ii = 0; ii < static_cast<int>(var.fields.size()); ++ii)
+ for (int fieldIndex = 0; fieldIndex < static_cast<int>(var.fields.size()); ++fieldIndex)
{
TIntermBinary *assign = new TIntermBinary(EOpAssign);
sequence->insert(sequence->begin(), assign);
@@ -166,11 +166,11 @@
TIntermBinary *indexDirectStruct = new TIntermBinary(EOpIndexDirectStruct);
TIntermSymbol *symbol = new TIntermSymbol(0, name, type);
indexDirectStruct->setLeft(symbol);
- TIntermConstantUnion *indexNode = constructIndexNode(ii);
+ TIntermConstantUnion *indexNode = constructIndexNode(fieldIndex);
indexDirectStruct->setRight(indexNode);
assign->setLeft(indexDirectStruct);
- const sh::ShaderVariable &field = var.fields[ii];
+ const sh::ShaderVariable &field = var.fields[fieldIndex];
TType fieldType = sh::ConvertShaderVariableTypeToTType(field.type);
TIntermConstantUnion *zeroConst = constructConstUnionNode(fieldType);
assign->setRight(zeroConst);