diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-04-28 10:39:53 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-04-28 10:39:53 +0100 |
commit | 96df3f3eb1351973d140ba73b507de44b1052c89 (patch) | |
tree | b8af6758b4b323aca62ef53f05ab81580b861cbb /indra/llui/llloadingindicator.cpp | |
parent | fbc0e795b114ddbfb73cc62ce25a1e9a1cafacba (diff) | |
parent | 9e8f820e35d9d9ea9318f51ac1f46b11f61a68f7 (diff) |
merge from PE's viewer-trunk
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]; } |