From cebd97eb24e95980ab319f4d731c56a4669da87a Mon Sep 17 00:00:00 2001 From: Jamie Madill Date: Wed, 14 Dec 2016 15:48:56 -0500 Subject: [PATCH] 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. --- glslang/MachineIndependent/Constant.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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 @@ bool isNan(double x) 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 @@ bool isInf(double x) 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 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right 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 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType) // // 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 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode) 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 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode) 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 @@ TIntermTyped* TIntermediate::foldDereference(TIntermTyped* node, int index, cons } // -// 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) -- 2.7.4