diff options
author | Runitai Linden <davep@lindenlab.com> | 2022-01-21 10:33:37 -0600 |
---|---|---|
committer | Runitai Linden <davep@lindenlab.com> | 2022-01-21 10:33:37 -0600 |
commit | 5b04123aec281de30fb8b6473600f6b1e9d16909 (patch) | |
tree | 1ffac17fe885182483ed44fa93db723554761024 /indra/llxml/llcontrol.h | |
parent | e7caafba5c4eec21f02a642e37865bc04cd6536e (diff) | |
parent | 016b002b0f2faae0d62ce2d07b8e9856a3a1814d (diff) |
Merge remote-tracking branch 'remotes/origin/DRTVWR-546' into DRTVWR-539
# Conflicts:
# indra/llcommon/lltracerecording.h
# indra/newview/llfloaterpreference.cpp
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); } |