summaryrefslogtreecommitdiff
path: root/indra/llxml
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llxml')
-rwxr-xr-xindra/llxml/llcontrol.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/indra/llxml/llcontrol.h b/indra/llxml/llcontrol.h
index 8a8479f90f..04575d81e0 100755
--- a/indra/llxml/llcontrol.h
+++ b/indra/llxml/llcontrol.h
@@ -395,7 +395,6 @@ class LLCachedControl
public:
LLCachedControl(LLControlGroup& group,
const std::string& name,
-
const T& default_value,
const std::string& comment = "Declared In Code")
{
@@ -406,6 +405,16 @@ public:
}
}
+ LLCachedControl(LLControlGroup& group,
+ const std::string& name)
+ {
+ mCachedControlPtr = LLControlCache<T>::getInstance(name);
+ if (mCachedControlPtr.isNull())
+ {
+ mCachedControlPtr = new LLControlCache<T>(group, name);
+ }
+ }
+
operator const T&() const { return mCachedControlPtr->getValue(); }
operator boost::function<const T&()> () const { return boost::function<const T&()>(*this); }
const T& operator()() { return mCachedControlPtr->getValue(); }