A few nullchecks, and removal of pointless uint < 0 bounds checks.

This commit is contained in:
Shyotl
2012-08-30 02:52:10 -05:00
committed by Siana Gearz
parent fefb40bda2
commit 6ec4c65f04
3 changed files with 11 additions and 6 deletions

View File

@@ -64,7 +64,7 @@ void LLFontBitmapCache::init(S32 num_components,
LLImageRaw *LLFontBitmapCache::getImageRaw(U32 bitmap_num) const
{
if ((bitmap_num < 0) || (bitmap_num >= mImageRawVec.size()))
if (bitmap_num >= mImageRawVec.size())
return NULL;
return mImageRawVec[bitmap_num];
@@ -72,7 +72,7 @@ LLImageRaw *LLFontBitmapCache::getImageRaw(U32 bitmap_num) const
LLImageGL *LLFontBitmapCache::getImageGL(U32 bitmap_num) const
{
if ((bitmap_num < 0) || (bitmap_num >= mImageGLVec.size()))
if (bitmap_num >= mImageGLVec.size())
return NULL;
return mImageGLVec[bitmap_num];