diff options
author | Richard Linden <none@none> | 2012-04-13 11:48:37 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2012-04-13 11:48:37 -0700 |
commit | 61d202a15d70ec56e46bca2edadd49cfd5cbb956 (patch) | |
tree | 62e11048d3a1d3cba63c22eb4d5eb510c2e3b7e7 | |
parent | fc780921c1e3c411014fe22a31a0fe4d0fd0b2cf (diff) |
renamed Lazy to Atomic
-rw-r--r-- | indra/llui/llloadingindicator.h | 2 | ||||
-rw-r--r-- | indra/llxuixml/llinitparam.h | 19 |
2 files changed, 10 insertions, 11 deletions
diff --git a/indra/llui/llloadingindicator.h b/indra/llui/llloadingindicator.h index 4998a57263..ffcb329f42 100644 --- a/indra/llui/llloadingindicator.h +++ b/indra/llui/llloadingindicator.h @@ -63,7 +63,7 @@ public: struct Params : public LLInitParam::Block<Params, LLUICtrl::Params> { Optional<F32> images_per_sec; - Optional<Batch<Images> > images; + Optional<Atomic<Images> > images; Params() : images_per_sec("images_per_sec", 1.0f), diff --git a/indra/llxuixml/llinitparam.h b/indra/llxuixml/llinitparam.h index 75c09125eb..dcbbf9f0a7 100644 --- a/indra/llxuixml/llinitparam.h +++ b/indra/llxuixml/llinitparam.h @@ -395,7 +395,7 @@ namespace LLInitParam typedef LLInitParam::NOT_BLOCK NOT_BLOCK; template<typename T> - class Batch + class Atomic {}; //TODO: implement in terms of owned_ptr @@ -1916,19 +1916,19 @@ namespace LLInitParam }; template<typename T, typename BLOCK_IDENTIFIER> - struct IsBlock<ParamValue<BaseBlock::Batch<T>, TypeValues<BaseBlock::Batch<T> >, typename IsBlock<BaseBlock::Batch<T> >::value_t >, BLOCK_IDENTIFIER> + struct IsBlock<ParamValue<BaseBlock::Atomic<T>, TypeValues<BaseBlock::Atomic<T> >, typename IsBlock<BaseBlock::Atomic<T> >::value_t >, BLOCK_IDENTIFIER> { typedef typename IsBlock<ParamValue<T, TypeValues<T> > >::value_t value_t; }; template<typename T, typename BLOCK_T> - class ParamValue <BaseBlock::Batch<T>, - TypeValues<BaseBlock::Batch<T> >, + class ParamValue <BaseBlock::Atomic<T>, + TypeValues<BaseBlock::Atomic<T> >, BLOCK_T> : public TypeValues<T> { public: - typedef ParamValue <BaseBlock::Batch<T>, TypeValues<BaseBlock::Batch<T> >, BLOCK_T> self_t; + typedef ParamValue <BaseBlock::Atomic<T>, TypeValues<BaseBlock::Atomic<T> >, BLOCK_T> self_t; typedef ParamValue<T, TypeValues<T> > param_value_t; typedef const T& value_assignment_t; typedef T value_t; @@ -1985,8 +1985,7 @@ namespace LLInitParam { if (new_name) { - // reset block - mValue = defaultBatchValue(); + resetToDefault(); } return mValue.deserializeBlock(p, name_stack_range, new_name); } @@ -2008,7 +2007,7 @@ namespace LLInitParam { if (overwrite) { - mValue = defaultBatchValue(); + resetToDefault(); return mValue.mergeBlock(block_data, source, overwrite); } return false; @@ -2028,10 +2027,10 @@ namespace LLInitParam mutable bool mValidated; // lazy validation flag private: - static const T& defaultBatchValue() + void resetToDefault() { static T default_value; - return default_value; + mValue = default_value; } T mValue; |