diff options
author | Mark Palange (Mani) <palange@lindenlab.com> | 2009-10-05 13:39:53 -0700 |
---|---|---|
committer | Mark Palange (Mani) <palange@lindenlab.com> | 2009-10-05 13:39:53 -0700 |
commit | 81a63ac0886a31a566535a3483e5013f5bc0b424 (patch) | |
tree | 1bb0319755a5e26e0bc7f9f20632ae8f31538971 /indra/llxuixml/llinitparam.h | |
parent | 0f5bbec3747f3ff2b1d580506d35dc080fcd1a98 (diff) | |
parent | 9818f158366a0df980a2e4b9251177d9a9209cfb (diff) |
merge with latest from lindenlab/svn-imports-viewer-20
Diffstat (limited to 'indra/llxuixml/llinitparam.h')
-rw-r--r-- | indra/llxuixml/llinitparam.h | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/indra/llxuixml/llinitparam.h b/indra/llxuixml/llinitparam.h index baa782916e..88bc430504 100644 --- a/indra/llxuixml/llinitparam.h +++ b/indra/llxuixml/llinitparam.h @@ -1568,11 +1568,11 @@ namespace LLInitParam public Param { public: - typedef BlockValue<T> self_t; - typedef Block<TypedParam<T, TypeValues<T>, false> > block_t; - typedef const T& value_const_ref_t; - typedef value_const_ref_t value_assignment_t; - typedef typename TypeValues<T>::KeyCache key_cache_t; + typedef BlockValue<T> self_t; + typedef Block<TypedParam<T, TypeValues<T>, false> > block_t; + typedef const T& value_const_ref_t; + typedef value_const_ref_t value_assignment_t; + typedef typename TypeValues<T>::KeyCache key_cache_t; BlockValue(BlockDescriptor& block_descriptor, const char* name, value_assignment_t value, ParamDescriptor::validation_func_t validate_func, S32 min_count, S32 max_count) : Param(block_descriptor.mCurrentBlockPtr), @@ -1754,11 +1754,16 @@ namespace LLInitParam protected: value_assignment_t get() const { - if (mData.mLastParamVersion < BaseBlock::getLastChangeVersion() && block_t::validateBlock(true)) + // if some parameters were provided, issue warnings on invalid blocks + if (Param::getProvided() && (mData.mLastParamVersion < BaseBlock::getLastChangeVersion())) { - mData.mValue = static_cast<const DERIVED*>(this)->getValueFromBlock(); - mData.clearKey(); - mData.mLastParamVersion = BaseBlock::getLastChangeVersion(); + // go ahead and issue warnings at this point if any param is invalid + if(block_t::validateBlock(false)) + { + mData.mValue = static_cast<const DERIVED*>(this)->getValueFromBlock(); + mData.clearKey(); + mData.mLastParamVersion = BaseBlock::getLastChangeVersion(); + } } return mData.mValue; |