diff options
author | Kitty Barnett <develop@catznip.com> | 2023-01-02 23:04:02 +0100 |
---|---|---|
committer | Kitty Barnett <develop@catznip.com> | 2023-01-02 23:04:42 +0100 |
commit | 6850b915fe42f5a75fc9d8bb9ca05f961de3244a (patch) | |
tree | 0921b5e0c74a64ad65d1b5702b00142badb6140c /indra/llxml/llcontrol.h | |
parent | 89456ec88df01565e2c9a424a0097a5a02e1838c (diff) | |
parent | f3f3c493ec2a658cf5c1aac6670c54c550e944fd (diff) |
Merge branch 'master' into texture-preview
Diffstat (limited to 'indra/llxml/llcontrol.h')
-rw-r--r-- | indra/llxml/llcontrol.h | 9 |
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); } |