Commit cba04990 by alokp@chromium.org

Added parentheses around a few operators so that if they are used in a compound…

Added parentheses around a few operators so that if they are used in a compound statement, order of operations is preserved. BUG=5 TEST=OpenGL ES 2.0 conformance tests. Review URL: http://codereview.appspot.com/1691041 git-svn-id: https://angleproject.googlecode.com/svn/trunk@336 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 334aa1f3
......@@ -220,16 +220,17 @@ bool TOutputGLSL::visitBinary(Visit visit, TIntermBinary* node)
mDeclaringVariables = false;
}
break;
case EOpAssign: writeTriplet(visit, NULL, " = ", NULL); break;
case EOpAddAssign: writeTriplet(visit, NULL, " += ", NULL); break;
case EOpSubAssign: writeTriplet(visit, NULL, " -= ", NULL); break;
case EOpDivAssign: writeTriplet(visit, NULL, " /= ", NULL); break;
case EOpAssign: writeTriplet(visit, "(", " = ", ")"); break;
case EOpAddAssign: writeTriplet(visit, "(", " += ", ")"); break;
case EOpSubAssign: writeTriplet(visit, "(", " -= ", ")"); break;
case EOpDivAssign: writeTriplet(visit, "(", " /= ", ")"); break;
// Notice the fall-through.
case EOpMulAssign:
case EOpVectorTimesMatrixAssign:
case EOpVectorTimesScalarAssign:
case EOpMatrixTimesScalarAssign:
case EOpMatrixTimesMatrixAssign:
writeTriplet(visit, NULL, " *= ", NULL);
writeTriplet(visit, "(", " *= ", ")");
break;
case EOpIndexDirect:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment