Fix debug build on Linux
Compiling an assert in Program.cpp was failing at least on GCC 4.8
because it compared unsigned size_t to zero, a comparison that was always
true. The C standard defines size_t as unsigned, so the assert shouldn't
be necessary on other platforms either.
There was already a commit on top of the patch that added the bug, so it
is simpler to fix the problem by changing the assert rather than
reverting.
TEST=standalone debug build on Linux
Change-Id: Ifd910332a770f7360a15c31706beca740d0f289d
Reviewed-on: https://chromium-review.googlesource.com/294971
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
diff --git a/src/libANGLE/Program.cpp b/src/libANGLE/Program.cpp
index ff67dc1..271502d 100644
--- a/src/libANGLE/Program.cpp
+++ b/src/libANGLE/Program.cpp
@@ -615,8 +615,7 @@
bool Program::isAttribLocationActive(size_t attribLocation) const
{
- ASSERT(attribLocation >= 0 &&
- static_cast<size_t>(attribLocation) < mData.mActiveAttribLocationsMask.size());
+ ASSERT(attribLocation < mData.mActiveAttribLocationsMask.size());
return mData.mActiveAttribLocationsMask[attribLocation];
}