From 61d202a15d70ec56e46bca2edadd49cfd5cbb956 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 13 Apr 2012 11:48:37 -0700 Subject: renamed Lazy to Atomic --- indra/llxuixml/llinitparam.h | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'indra/llxuixml/llinitparam.h') 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 - class Batch + class Atomic {}; //TODO: implement in terms of owned_ptr @@ -1916,19 +1916,19 @@ namespace LLInitParam }; template - struct IsBlock, TypeValues >, typename IsBlock >::value_t >, BLOCK_IDENTIFIER> + struct IsBlock, TypeValues >, typename IsBlock >::value_t >, BLOCK_IDENTIFIER> { typedef typename IsBlock > >::value_t value_t; }; template - class ParamValue , - TypeValues >, + class ParamValue , + TypeValues >, BLOCK_T> : public TypeValues { public: - typedef ParamValue , TypeValues >, BLOCK_T> self_t; + typedef ParamValue , TypeValues >, BLOCK_T> self_t; typedef ParamValue > 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; -- cgit v1.2.3