diff options
author | Aimee Linden <aimee@lindenlab.com> | 2010-04-29 02:38:39 +0100 |
---|---|---|
committer | Aimee Linden <aimee@lindenlab.com> | 2010-04-29 02:38:39 +0100 |
commit | b90ece0936149a69b1176adc4ae2508c61e34fd7 (patch) | |
tree | 4295b0d766fd6cc80afccac4b689134741b5bb0e /indra/llui/llloadingindicator.cpp | |
parent | 46897efc3efade25feaaa1dc67bc131c35202d12 (diff) | |
parent | 8c3feea2a2f3bcb648f712f63ea9c4dab8aaa0c3 (diff) |
Merge
Diffstat (limited to 'indra/llui/llloadingindicator.cpp')
-rw-r--r-- | indra/llui/llloadingindicator.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/indra/llui/llloadingindicator.cpp b/indra/llui/llloadingindicator.cpp index 8dec6ea9df..f8b029e19c 100644 --- a/indra/llui/llloadingindicator.cpp +++ b/indra/llui/llloadingindicator.cpp @@ -78,10 +78,8 @@ void LLLoadingIndicator::Data::initSingleton() LLPointer<LLUIImage> LLLoadingIndicator::Data::getNextImage(S8& idx) const { - // Actually selects previous image because - // current images seem to be in wrong order; - // performs array bounds checking. - idx = idx > 0 ? llmin(NIMAGES-1, idx-1) : NIMAGES-1; + // Calculate next index, performing array bounds checking. + idx = (idx >= NIMAGES || idx < 0) ? 0 : (idx + 1) % NIMAGES; return mImages[idx]; } |