Change unicode dash to ASCII.
This change is helpful for integration with Chromium, which recently
added a compiler option to warn when compiling any source files which
use extended characters. In this case the offending character was a
single unicode dash in a comment.
diff --git a/glslang/MachineIndependent/Constant.cpp b/glslang/MachineIndependent/Constant.cpp
index 804626f..61b6f67 100644
--- a/glslang/MachineIndependent/Constant.cpp
+++ b/glslang/MachineIndependent/Constant.cpp
@@ -57,7 +57,7 @@
u.d = x;
int bitPatternL = u.i[0];
int bitPatternH = u.i[1];
- return (bitPatternH & 0x7ff80000) == 0x7ff80000 &&
+ return (bitPatternH & 0x7ff80000) == 0x7ff80000 &&
((bitPatternH & 0xFFFFF) != 0 || bitPatternL != 0);
}
@@ -68,7 +68,7 @@
u.d = x;
int bitPatternL = u.i[0];
int bitPatternH = u.i[1];
- return (bitPatternH & 0x7ff00000) == 0x7ff00000 &&
+ return (bitPatternH & 0x7ff00000) == 0x7ff00000 &&
(bitPatternH & 0xFFFFF) == 0 && bitPatternL == 0;
}
@@ -131,7 +131,7 @@
TConstUnionArray smearedArray(newComps, rightNode->getConstArray()[0]);
rightUnionArray = smearedArray;
} else if (constComps > 1 && newComps == 1) {
- // for a case like vec4 f = 1.2 + vec4(2,3,4,5);
+ // for a case like vec4 f = 1.2 + vec4(2,3,4,5);
newComps = constComps;
rightUnionArray = rightNode->getConstArray();
TConstUnionArray smearedArray(newComps, getConstArray()[0]);
@@ -626,7 +626,7 @@
//
// Do constant folding for an aggregate node that has all its children
// as constants and an operator that requires constant folding.
-//
+//
TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode)
{
if (! areAllChildConst(aggrNode))
@@ -802,7 +802,7 @@
break;
case EOpSmoothStep:
{
- double t = (childConstUnions[2][arg2comp].getDConst() - childConstUnions[0][arg0comp].getDConst()) /
+ double t = (childConstUnions[2][arg2comp].getDConst() - childConstUnions[0][arg0comp].getDConst()) /
(childConstUnions[1][arg1comp].getDConst() - childConstUnions[0][arg0comp].getDConst());
if (t < 0.0)
t = 0.0;
@@ -841,7 +841,7 @@
newConstArray[2] = childConstUnions[0][0] * childConstUnions[1][1] - childConstUnions[0][1] * childConstUnions[1][0];
break;
case EOpFaceForward:
- // If dot(Nref, I) < 0 return N, otherwise return N: Arguments are (N, I, Nref).
+ // If dot(Nref, I) < 0 return N, otherwise return -N: Arguments are (N, I, Nref).
dot = childConstUnions[1].dot(childConstUnions[2]);
for (int comp = 0; comp < numComps; ++comp) {
if (dot < 0.0)
@@ -968,7 +968,7 @@
}
//
-// Make a constant vector node or constant scalar node, representing a given
+// Make a constant vector node or constant scalar node, representing a given
// constant vector and constant swizzle into it.
//
TIntermTyped* TIntermediate::foldSwizzle(TIntermTyped* node, TVectorFields& fields, const TSourceLoc& loc)