diff options
author | Richard Linden <none@none> | 2011-09-06 14:45:11 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2011-09-06 14:45:11 -0700 |
commit | b183b6f1413f2f534633f021480ccc4570235f2d (patch) | |
tree | 81c4501960ae728242c96299bcd2e4b43ec2b73d /indra/llxuixml | |
parent | 2154bccdc4ef79bc2d593daad85d1344e9177bcf (diff) |
EXP-1196 FIX Fix param block template ordering
changed ordering of template loading relative to constructor setting of params
moved a lot of constructor-set params to template files
reviewed by Leslie
Diffstat (limited to 'indra/llxuixml')
-rw-r--r-- | indra/llxuixml/llinitparam.h | 44 |
1 files changed, 11 insertions, 33 deletions
diff --git a/indra/llxuixml/llinitparam.h b/indra/llxuixml/llinitparam.h index 194ef8af6a..e40bdb4a3d 100644 --- a/indra/llxuixml/llinitparam.h +++ b/indra/llxuixml/llinitparam.h @@ -717,14 +717,6 @@ namespace LLInitParam Param::enclosingBlock().paramChanged(*this, flag_as_provided); } - void setIfNotProvided(value_assignment_t val, bool flag_as_provided = true) - { - if (!isProvided()) - { - set(val, flag_as_provided); - } - } - // implicit conversion operator value_assignment_t() const { return param_value_t::getValue(); } // explicit conversion @@ -869,14 +861,6 @@ namespace LLInitParam Param::enclosingBlock().paramChanged(*this, flag_as_provided); } - void setIfNotProvided(value_assignment_t val, bool flag_as_provided = true) - { - if (!isProvided()) - { - set(val, flag_as_provided); - } - } - // propagate changed status up to enclosing block /*virtual*/ void paramChanged(const Param& changed_param, bool user_provided) { @@ -1033,15 +1017,6 @@ namespace LLInitParam Param::enclosingBlock().paramChanged(*this, flag_as_provided); } - - void setIfNotProvided(value_assignment_t val, bool flag_as_provided = true) - { - if (!isProvided()) - { - set(val, flag_as_provided); - } - } - value_t& add() { mValues.push_back(param_value_t(value_t())); @@ -1232,14 +1207,6 @@ namespace LLInitParam Param::enclosingBlock().paramChanged(*this, flag_as_provided); } - void setIfNotProvided(value_assignment_t val, bool flag_as_provided = true) - { - if (!isProvided()) - { - set(val, flag_as_provided); - } - } - value_t& add() { mValues.push_back(value_t()); @@ -1719,6 +1686,17 @@ namespace LLInitParam static BlockDescriptor sBlockDescriptor; return sBlockDescriptor; } + + template <typename T, typename NAME_VALUE_LOOKUP, bool multiple, bool is_block> + void changeDefault(TypedParam<T, NAME_VALUE_LOOKUP, multiple, is_block>& param, + typename TypedParam<T, NAME_VALUE_LOOKUP, multiple, is_block>::value_assignment_t value) + { + if (!param.isProvided()) + { + param.set(value, false); + } + } + }; template<typename T> |