diff options
author | Richard Linden <none@none> | 2011-10-04 13:26:54 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2011-10-04 13:26:54 -0700 |
commit | 50c0447808f7041d5af5017c847a462e9599bdb5 (patch) | |
tree | bde88047b2f6bd4df35cc95bd49757dbdccf11dc /indra/llui/llui.h | |
parent | 44e9fb446f3c92c3dfd9b5be8a3e02ec5a44ba00 (diff) |
disabled min and max windows macros
another attempt at fixing gcc builds
Diffstat (limited to 'indra/llui/llui.h')
-rw-r--r-- | indra/llui/llui.h | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/indra/llui/llui.h b/indra/llui/llui.h index 8cec1a16f4..af8f239657 100644 --- a/indra/llui/llui.h +++ b/indra/llui/llui.h @@ -41,6 +41,7 @@ #include <boost/signals2.hpp> #include "lllazyvalue.h" #include "llframetimer.h" +#include <limits> // LLUIFactory #include "llsd.h" @@ -150,27 +151,25 @@ public: // // Classes // + template <typename T> + struct RangeParams : public LLInitParam::Block<RangeParams<T> > + { + Optional<T> minimum, + maximum; + + RangeParams() + : minimum("min", T()), + maximum("max", std::numeric_limits<T>::max()) + {} + }; template <typename T> struct Range { typedef Range<T> self_t; - struct Params : public LLInitParam::Block<Params> - { - typename Optional<T> minimum, - maximum; - - Params() - : minimum("min", 0), - maximum("max", S32_MAX) - { - - } - }; - // correct for inverted params - Range(const Params& p = Params()) + Range(const RangeParams<T>& p = RangeParams<T>()) : mMin(p.minimum), mMax(p.maximum) { @@ -228,12 +227,12 @@ public: { typedef Range<T> range_t; - struct Params : public LLInitParam::Block<Params, typename range_t::Params> + struct Params : public LLInitParam::Block<Params, RangeParams<T> > { - Mandatory<S32> value; + Mandatory<T> value; Params() - : value("", 0) + : value("", T()) { addSynonym(value, "value"); } |