summaryrefslogtreecommitdiff
path: root/indra/llxuixml/llinitparam.h
diff options
context:
space:
mode:
authorLeslie Linden <leslie@lindenlab.com>2011-09-08 10:55:48 -0700
committerLeslie Linden <leslie@lindenlab.com>2011-09-08 10:55:48 -0700
commit1c7b1532e994f8c4d1c69e419e34f07c1a9ee918 (patch)
treeff5b60dbc6887a7a7420728a06804fa268720211 /indra/llxuixml/llinitparam.h
parent82b1b1bc6ee91e1778a16634fb9e2988da23fd71 (diff)
parent78821c51a1f7d5fcc6e4a2678bfd3446ccfaee36 (diff)
Merge from viewer-experience
Diffstat (limited to 'indra/llxuixml/llinitparam.h')
-rw-r--r--indra/llxuixml/llinitparam.h44
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>