summaryrefslogtreecommitdiff
path: root/indra/llxml/llcontrol.h
diff options
context:
space:
mode:
authorEuclid Linden <euclid@lindenlab.com>2022-05-27 21:15:49 +0000
committerEuclid Linden <euclid@lindenlab.com>2022-05-27 21:15:49 +0000
commit3f98411c56f4daa06c9102346a8dd37af18d2cb6 (patch)
tree4255c2827cc3e07921275bfd7937f4f43f29d5fa /indra/llxml/llcontrol.h
parent3f58ec2fdfb76ce2160884a3e97be49f60b6ac90 (diff)
parent02c71b0ac2f99dd1c26a649ffce2182b2fc9a7d9 (diff)
Merged in DV528-merge-6.6.1 (pull request #1000)
DRTVWR-528 merge up to 6.6.1
Diffstat (limited to 'indra/llxml/llcontrol.h')
-rw-r--r--indra/llxml/llcontrol.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/indra/llxml/llcontrol.h b/indra/llxml/llcontrol.h
index 19508becc3..0839c02c50 100644
--- a/indra/llxml/llcontrol.h
+++ b/indra/llxml/llcontrol.h
@@ -247,6 +247,7 @@ public:
// generic getter
template<typename T> T get(const std::string& name)
{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD;
LLControlVariable* control = getControl(name);
LLSD value;
eControlType type = TYPE_COUNT;
@@ -405,8 +406,8 @@ public:
const T& default_value,
const std::string& comment = "Declared In Code")
{
- mCachedControlPtr = LLControlCache<T>::getInstance(name);
- if (mCachedControlPtr.isNull())
+ mCachedControlPtr = LLControlCache<T>::getInstance(name).get();
+ if (! mCachedControlPtr)
{
mCachedControlPtr = new LLControlCache<T>(group, name, default_value, comment);
}
@@ -415,8 +416,8 @@ public:
LLCachedControl(LLControlGroup& group,
const std::string& name)
{
- mCachedControlPtr = LLControlCache<T>::getInstance(name);
- if (mCachedControlPtr.isNull())
+ mCachedControlPtr = LLControlCache<T>::getInstance(name).get();
+ if (! mCachedControlPtr)
{
mCachedControlPtr = new LLControlCache<T>(group, name);
}