summaryrefslogtreecommitdiff
path: root/indra/llcommon/lldefs.h
diff options
context:
space:
mode:
authorKelly Washington <kelly@lindenlab.com>2008-04-03 22:50:22 +0000
committerKelly Washington <kelly@lindenlab.com>2008-04-03 22:50:22 +0000
commitdc48f1c7417f0f49ad1bd32330845ce17a29eece (patch)
tree8772aff5f32c1702228b7ca7e324fbd077269854 /indra/llcommon/lldefs.h
parentb5936a4b1d8780b5b8cd425998eacd2c64ffa693 (diff)
svn merge -r83872:83893 linden/branches/Branch_1-20-0-Server to linden/release
HAVOK4 IN TEH HOUSE!!11!!ONE!! If it is broken blame Joel for not fixing the loginassetdatabaseinventorygroupIM server instead of working on this. QAR-448
Diffstat (limited to 'indra/llcommon/lldefs.h')
-rw-r--r--indra/llcommon/lldefs.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/indra/llcommon/lldefs.h b/indra/llcommon/lldefs.h
index 96b2ab169b..34bde66678 100644
--- a/indra/llcommon/lldefs.h
+++ b/indra/llcommon/lldefs.h
@@ -218,7 +218,15 @@ inline LLDATATYPE llmin(const LLDATATYPE& d1, const LLDATATYPE& d2, const LLDATA
template <class LLDATATYPE>
inline LLDATATYPE llclamp(const LLDATATYPE& a, const LLDATATYPE& minval, const LLDATATYPE& maxval)
{
- return llmin(llmax(a, minval), maxval);
+ if ( a < minval )
+ {
+ return minval;
+ }
+ else if ( a > maxval )
+ {
+ return maxval;
+ }
+ return a;
}
template <class LLDATATYPE>
@@ -234,3 +242,4 @@ inline LLDATATYPE llclampb(const LLDATATYPE& a)
}
#endif // LL_LLDEFS_H
+