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/compiler/translator/VariableInfo.cpp b/src/compiler/translator/VariableInfo.cpp
index d61dc40..8e1c008 100644
--- a/src/compiler/translator/VariableInfo.cpp
+++ b/src/compiler/translator/VariableInfo.cpp
@@ -55,7 +55,8 @@
{
if (variable.isArray())
{
- for (size_t elementIndex = 0; elementIndex < variable.elementCount(); elementIndex++)
+ for (unsigned int elementIndex = 0; elementIndex < variable.elementCount();
+ elementIndex++)
{
std::string lname = name + ::ArrayString(elementIndex);
std::string lmappedName = mappedName + ::ArrayString(elementIndex);