Revert "Fix and enable warning C4244 (Conversion from 'type1' to 'type2', possible loss of data)"
Causing a build failure on Mac/Clang:
./Tokenizer.cpp:551:7: error: extra tokens at end of #else directive [-Werror,-Wextra-tokens]
#else if defined(_MSC_VER)
http://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Mac%20Builder/builds/29136
This reverts commit 3b26e231d99154814eb428f75a67bbe7a21adadc.
Change-Id: I2d11ddcc18130d908fd2ec3d6f5ab890cfccd5e7
Reviewed-on: https://chromium-review.googlesource.com/264983
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/compiler/translator/IntermNode.cpp b/src/compiler/translator/IntermNode.cpp
index 708dcb3..266e3c8 100644
--- a/src/compiler/translator/IntermNode.cpp
+++ b/src/compiler/translator/IntermNode.cpp
@@ -448,13 +448,13 @@
{
mOp = EOpVectorTimesMatrix;
setType(TType(basicType, higherPrecision, EvqTemporary,
- static_cast<unsigned char>(mRight->getCols()), 1));
+ mRight->getCols(), 1));
}
else
{
mOp = EOpMatrixTimesScalar;
setType(TType(basicType, higherPrecision, EvqTemporary,
- static_cast<unsigned char>(mRight->getCols()), static_cast<unsigned char>(mRight->getRows())));
+ mRight->getCols(), mRight->getRows()));
}
}
else if (mLeft->isMatrix() && !mRight->isMatrix())
@@ -463,7 +463,7 @@
{
mOp = EOpMatrixTimesVector;
setType(TType(basicType, higherPrecision, EvqTemporary,
- static_cast<unsigned char>(mLeft->getRows()), 1));
+ mLeft->getRows(), 1));
}
else
{
@@ -474,7 +474,7 @@
{
mOp = EOpMatrixTimesMatrix;
setType(TType(basicType, higherPrecision, EvqTemporary,
- static_cast<unsigned char>(mRight->getCols()), static_cast<unsigned char>(mLeft->getRows())));
+ mRight->getCols(), mLeft->getRows()));
}
else if (!mLeft->isMatrix() && !mRight->isMatrix())
{
@@ -486,7 +486,7 @@
{
mOp = EOpVectorTimesScalar;
setType(TType(basicType, higherPrecision, EvqTemporary,
- static_cast<unsigned char>(nominalSize), 1));
+ nominalSize, 1));
}
}
else
@@ -529,7 +529,7 @@
{
mOp = EOpMatrixTimesMatrixAssign;
setType(TType(basicType, higherPrecision, EvqTemporary,
- static_cast<unsigned char>(mRight->getCols()), static_cast<unsigned char>(mLeft->getRows())));
+ mRight->getCols(), mLeft->getRows()));
}
else if (!mLeft->isMatrix() && !mRight->isMatrix())
{
@@ -543,7 +543,7 @@
return false;
mOp = EOpVectorTimesScalarAssign;
setType(TType(basicType, higherPrecision, EvqTemporary,
- static_cast<unsigned char>(mLeft->getNominalSize()), 1));
+ mLeft->getNominalSize(), 1));
}
}
else
@@ -613,7 +613,7 @@
const int secondarySize = std::max(
mLeft->getSecondarySize(), mRight->getSecondarySize());
setType(TType(basicType, higherPrecision, EvqTemporary,
- static_cast<unsigned char>(nominalSize), static_cast<unsigned char>(secondarySize)));
+ nominalSize, secondarySize));
if (mLeft->isArray())
{
ASSERT(mLeft->getArraySize() == mRight->getArraySize());
@@ -747,8 +747,8 @@
}
// update return type for matrix product
- returnType.setPrimarySize(static_cast<unsigned char>(resultCols));
- returnType.setSecondarySize(static_cast<unsigned char>(resultRows));
+ returnType.setPrimarySize(resultCols);
+ returnType.setSecondarySize(resultRows);
}
break;
@@ -868,7 +868,7 @@
}
returnType = node->getType();
- returnType.setPrimarySize(static_cast<unsigned char>(matrixRows));
+ returnType.setPrimarySize(matrixRows);
tempNode = new TIntermConstantUnion(tempConstArray, returnType);
tempNode->setLine(getLine());
@@ -903,7 +903,7 @@
}
}
- returnType.setPrimarySize(static_cast<unsigned char>(matrixCols));
+ returnType.setPrimarySize(matrixCols);
}
break;