Reland Fixed compiler warning C4267 'conversion from 'size_t' to 'type', possible loss of data'
Additional warnings found with more testing and added C4267 warning disable only for angle_libpng
BUG=angleproject:1120
Change-Id: Ic403dcff5a8018056fa51a8c408e64207f3362eb
Reviewed-on: https://chromium-review.googlesource.com/293028
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/tests/gl_tests/IndexedPointsTest.cpp b/src/tests/gl_tests/IndexedPointsTest.cpp
index af59eb5..3813cb5 100644
--- a/src/tests/gl_tests/IndexedPointsTest.cpp
+++ b/src/tests/gl_tests/IndexedPointsTest.cpp
@@ -149,11 +149,14 @@
{
glBindBuffer(GL_ARRAY_BUFFER, mVertexWithColorBuffer);
GLint vertexLocation = glGetAttribLocation(program, "position");
- glVertexAttribPointer(vertexLocation, 2, GL_FLOAT, GL_FALSE, VertexWithColorSize, 0);
+ glVertexAttribPointer(vertexLocation, 2, GL_FLOAT, GL_FALSE,
+ static_cast<const GLsizei>(VertexWithColorSize), 0);
glEnableVertexAttribArray(vertexLocation);
GLint vertexColorLocation = glGetAttribLocation(program, "color");
- glVertexAttribPointer(vertexColorLocation, 3, GL_FLOAT, GL_FALSE, VertexWithColorSize, (GLvoid*)((sizeof(float) * 2)));
+ glVertexAttribPointer(vertexColorLocation, 3, GL_FLOAT, GL_FALSE,
+ static_cast<const GLsizei>(VertexWithColorSize),
+ (GLvoid *)((sizeof(float) * 2)));
glEnableVertexAttribArray(vertexColorLocation);
}
else