Clean up binary operation constant folding code
Fix mixed up comments, remove unnecessary type conversions, clarify
variable names and improve formatting in a few places.
TEST=angle_unittests, WebGL conformance tests
BUG=angleproject:913
Change-Id: Ice8fe3682d8e97f42747752302a1fba116132df4
Reviewed-on: https://chromium-review.googlesource.com/266843
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
diff --git a/src/compiler/translator/Intermediate.cpp b/src/compiler/translator/Intermediate.cpp
index ecc6915..ebe6c39 100644
--- a/src/compiler/translator/Intermediate.cpp
+++ b/src/compiler/translator/Intermediate.cpp
@@ -143,7 +143,7 @@
if (childTempConstant)
{
- TIntermTyped *newChild = childTempConstant->fold(op, 0, mInfoSink);
+ TIntermTyped *newChild = childTempConstant->fold(op, nullptr, mInfoSink);
if (newChild)
return newChild;