diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-28 12:48:48 -0800 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-28 12:48:48 -0800 |
commit | 5a34cf1af83314774f11b0d24279794794bc9147 (patch) | |
tree | 720b576c642646f27d3e5b4f7ccba91b9e708371 /indra/llrender | |
parent | 2795661869e3dbbfe1e6becec1d6bb3635eafd3b (diff) | |
parent | fc8e185fafcfea1ead8b9c064ed38d5ac65f81b6 (diff) |
Merge from viewer2 trunk.
Diffstat (limited to 'indra/llrender')
-rw-r--r-- | indra/llrender/llfontbitmapcache.cpp | 4 | ||||
-rw-r--r-- | indra/llrender/llimagegl.cpp | 5 | ||||
-rw-r--r-- | indra/llrender/llvertexbuffer.cpp | 6 |
3 files changed, 6 insertions, 9 deletions
diff --git a/indra/llrender/llfontbitmapcache.cpp b/indra/llrender/llfontbitmapcache.cpp index f01878642a..fa231c9e6a 100644 --- a/indra/llrender/llfontbitmapcache.cpp +++ b/indra/llrender/llfontbitmapcache.cpp @@ -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]; diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 46478ba3c9..8bcc4723ae 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -1716,10 +1716,7 @@ void LLImageGL::updatePickMask(S32 width, S32 height, const U8* data_in) { U32 pick_idx = pick_bit/8; U32 pick_offset = pick_bit%8; - if (pick_idx >= size) - { - llerrs << "WTF?" << llendl; - } + llassert(pick_idx < size); mPickMask[pick_idx] |= 1 << pick_offset; } diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index 3d755e4715..7212237bb1 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -237,7 +237,7 @@ void LLVertexBuffer::drawRange(U32 mode, U32 start, U32 end, U32 count, U32 indi llerrs << "Wrong vertex buffer bound." << llendl; } - if (mode > LLRender::NUM_MODES) + if (mode >= LLRender::NUM_MODES) { llerrs << "Invalid draw mode: " << mode << llendl; return; @@ -267,7 +267,7 @@ void LLVertexBuffer::draw(U32 mode, U32 count, U32 indices_offset) const llerrs << "Wrong vertex buffer bound." << llendl; } - if (mode > LLRender::NUM_MODES) + if (mode >= LLRender::NUM_MODES) { llerrs << "Invalid draw mode: " << mode << llendl; return; @@ -292,7 +292,7 @@ void LLVertexBuffer::drawArrays(U32 mode, U32 first, U32 count) const llerrs << "Wrong vertex buffer bound." << llendl; } - if (mode > LLRender::NUM_MODES) + if (mode >= LLRender::NUM_MODES) { llerrs << "Invalid draw mode: " << mode << llendl; return; |