diff options
author | John Kessenich <johnkslang@users.noreply.github.com> | 2016-10-26 22:51:43 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-26 22:51:43 -0600 |
commit | 850ac0628d74e8b7298709a30abb2fa796bf9ebc (patch) | |
tree | 2eb90e2450011f6f01f671048cb6f3a227c3f899 | |
parent | 0d628c179d2ef50a41f6b5513a237f16af441dd8 (diff) | |
parent | c8e60e28b7e50326b9675b83214206d27674c2aa (diff) | |
download | glslang-850ac0628d74e8b7298709a30abb2fa796bf9ebc.tar.gz |
Merge pull request #561 from jeremy-lunarg/unused
GLSL: apply unused variable
-rw-r--r-- | glslang/MachineIndependent/ParseHelper.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/glslang/MachineIndependent/ParseHelper.cpp b/glslang/MachineIndependent/ParseHelper.cpp index 71ee4f38..965cb07c 100644 --- a/glslang/MachineIndependent/ParseHelper.cpp +++ b/glslang/MachineIndependent/ParseHelper.cpp @@ -1216,7 +1216,7 @@ void TParseContext::computeBuiltinPrecisions(TIntermTyped& node, const TFunction function.getType().getQualifier().precision; } else if (TIntermAggregate* agg = node.getAsAggregate()) { TIntermSequence& sequence = agg->getSequence(); - int numArgs = (int)sequence.size(); + unsigned int numArgs = (unsigned int)sequence.size(); switch (agg->getOp()) { case EOpBitfieldExtract: numArgs = 1; @@ -1233,7 +1233,7 @@ void TParseContext::computeBuiltinPrecisions(TIntermTyped& node, const TFunction break; } // find the maximum precision from the arguments and parameters - for (unsigned int arg = 0; arg < sequence.size(); ++arg) { + for (unsigned int arg = 0; arg < numArgs; ++arg) { operationPrecision = std::max(operationPrecision, sequence[arg]->getAsTyped()->getQualifier().precision); operationPrecision = std::max(operationPrecision, function[arg].type->getQualifier().precision); } |