diff options
Diffstat (limited to 'gfx/angle/src/libANGLE/ImageIndex.cpp')
-rwxr-xr-x | gfx/angle/src/libANGLE/ImageIndex.cpp | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/gfx/angle/src/libANGLE/ImageIndex.cpp b/gfx/angle/src/libANGLE/ImageIndex.cpp index f74ce19d9..38c1941a3 100755 --- a/gfx/angle/src/libANGLE/ImageIndex.cpp +++ b/gfx/angle/src/libANGLE/ImageIndex.cpp @@ -135,12 +135,7 @@ ImageIndexIterator::ImageIndexIterator(GLenum type, const Range<GLint> &mipRange GLint ImageIndexIterator::maxLayer() const { - if (mLayerCounts) - { - ASSERT(mCurrentMip >= 0); - return (mCurrentMip < mMipRange.end) ? mLayerCounts[mCurrentMip] : 0; - } - return mLayerRange.end; + return (mLayerCounts ? static_cast<GLint>(mLayerCounts[mCurrentMip]) : mLayerRange.end); } ImageIndex ImageIndexIterator::next() @@ -154,29 +149,21 @@ ImageIndex ImageIndexIterator::next() if (mCurrentLayer != ImageIndex::ENTIRE_LEVEL) { - if (mCurrentLayer < maxLayer() - 1) + if (mCurrentLayer < maxLayer()-1) { mCurrentLayer++; } - else if (mCurrentMip < mMipRange.end - 1) + else if (mCurrentMip < mMipRange.end-1) { mCurrentMip++; mCurrentLayer = mLayerRange.start; } - else - { - done(); - } } - else if (mCurrentMip < mMipRange.end - 1) + else if (mCurrentMip < mMipRange.end-1) { mCurrentMip++; mCurrentLayer = mLayerRange.start; } - else - { - done(); - } return value; } @@ -198,10 +185,4 @@ bool ImageIndexIterator::hasNext() const return (mCurrentMip < mMipRange.end || mCurrentLayer < maxLayer()); } -void ImageIndexIterator::done() -{ - mCurrentMip = mMipRange.end; - mCurrentLayer = maxLayer(); } - -} // namespace gl |