Fix and enable warning C4244 (Conversion from 'type1' to 'type2', possible loss of data)
Change-Id: I73d9a2b9ad16f032be974b9c819de0dc1247c2ea
Reviewed-on: https://chromium-review.googlesource.com/264533
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/tests/end2end_tests/BlendMinMaxTest.cpp b/src/tests/end2end_tests/BlendMinMaxTest.cpp
index 8c02c5b..56a0877 100644
--- a/src/tests/end2end_tests/BlendMinMaxTest.cpp
+++ b/src/tests/end2end_tests/BlendMinMaxTest.cpp
@@ -28,7 +28,7 @@
static GLubyte getExpected(bool blendMin, float curColor, GLubyte prevColor)
{
- GLubyte curAsUbyte = (curColor * std::numeric_limits<GLubyte>::max()) + 0.5f;
+ GLubyte curAsUbyte = static_cast<GLubyte>((curColor * std::numeric_limits<GLubyte>::max()) + 0.5f);
return blendMin ? std::min<GLubyte>(curAsUbyte, prevColor) : std::max<GLubyte>(curAsUbyte, prevColor);
}