diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-05-26 03:07:05 +0300 |
|---|---|---|
| committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-05-26 03:07:05 +0300 |
| commit | 91606c7b60de4270050f373e1efe49eb3074951b (patch) | |
| tree | 5523b2c78c73d22881c0ae8bfbfcbb29ffdc5df4 /indra/llxml | |
| parent | e6245adce883d62f18a2d8b8af5061d3183d9be9 (diff) | |
| parent | cdbd06e8ed6e3f4285a61f5c0b607a65dfdf8dfd (diff) | |
Merge branch 'master' into DRTVWR-548-maint-N
Diffstat (limited to 'indra/llxml')
| -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); } |
