summaryrefslogtreecommitdiff
path: root/indra/llui/llloadingindicator.cpp
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2010-04-28 17:52:06 -0700
committerLeyla Farazha <leyla@lindenlab.com>2010-04-28 17:52:06 -0700
commita6adc00632d53445159b3ee91ecddea3fc667bff (patch)
tree858b59d3c17341ed43ffd746593cc4c206294242 /indra/llui/llloadingindicator.cpp
parentb6ba0da7f5e8d830f776ec974287b2d451a4715f (diff)
parent3bed004b5bb82e203d2e98ffc5d87273ea1dacc4 (diff)
Merge
Diffstat (limited to 'indra/llui/llloadingindicator.cpp')
-rw-r--r--indra/llui/llloadingindicator.cpp6
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];
}