Commit 401d9fe6 by Olli Etuaho

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/294971Reviewed-by: 's avatarOlli Etuaho <oetuaho@nvidia.com> Tested-by: 's avatarOlli Etuaho <oetuaho@nvidia.com>
parent d7a25243
...@@ -615,8 +615,7 @@ GLuint Program::getAttributeLocation(const std::string &name) ...@@ -615,8 +615,7 @@ GLuint Program::getAttributeLocation(const std::string &name)
bool Program::isAttribLocationActive(size_t attribLocation) const bool Program::isAttribLocationActive(size_t attribLocation) const
{ {
ASSERT(attribLocation >= 0 && ASSERT(attribLocation < mData.mActiveAttribLocationsMask.size());
static_cast<size_t>(attribLocation) < mData.mActiveAttribLocationsMask.size());
return mData.mActiveAttribLocationsMask[attribLocation]; return mData.mActiveAttribLocationsMask[attribLocation];
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment