summaryrefslogtreecommitdiff
path: root/indra/llui/llloadingindicator.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-04-28 10:42:20 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-04-28 10:42:20 +0100
commitac52aa08862833ab243fb6afc8c20d148e02c55c (patch)
tree755ce223f689260674087dc84b90111dcbee5813 /indra/llui/llloadingindicator.cpp
parentd71716aa6dde434b6356cfe85e3a8fce376056dd (diff)
parent96df3f3eb1351973d140ba73b507de44b1052c89 (diff)
merge from viewer-trunk
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];
}