diff options
| author | Rider Linden <rider@lindenlab.com> | 2026-07-23 19:33:32 -0700 |
|---|---|---|
| committer | Rider Linden <rider@lindenlab.com> | 2026-07-23 19:33:32 -0700 |
| commit | 5101e69367293d6d47bdb7383eabe7993e055050 (patch) | |
| tree | aa505602a1027d33ad7056dbedd1ba33485e9ec1 /indra/newview/llscripteditorws.cpp | |
| parent | 285e0a41b0ad676a7015a237dd828eb686da1c14 (diff) | |
Make the cached controls static to the function.
Diffstat (limited to 'indra/newview/llscripteditorws.cpp')
| -rw-r--r-- | indra/newview/llscripteditorws.cpp | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/indra/newview/llscripteditorws.cpp b/indra/newview/llscripteditorws.cpp index 555affe9a1..17ebd03ed2 100644 --- a/indra/newview/llscripteditorws.cpp +++ b/indra/newview/llscripteditorws.cpp @@ -157,9 +157,6 @@ namespace return std::string(s); } - LLCachedControl<bool>* OPT_ENABLESCRIPTEDITORWS(nullptr); - LLCachedControl<bool>* OPT_TIGHTINTEGRATION(nullptr); - } class LLPublishedPrimListener : public LLVOInventoryListener @@ -223,20 +220,14 @@ LLScriptEditorWSServer::ptr_t LLScriptEditorWSServer::getServer() bool LLScriptEditorWSServer::isEnabled() { - if (!OPT_ENABLESCRIPTEDITORWS) - { - OPT_ENABLESCRIPTEDITORWS = new LLCachedControl<bool>(gSavedSettings, "ExternalWebsocketSyncEnable", false); - } - return *OPT_ENABLESCRIPTEDITORWS; + static LLCachedControl<bool> OPT_ENABLESCRIPTEDITORWS(gSavedSettings, "ExternalWebsocketSyncEnable", false); + return OPT_ENABLESCRIPTEDITORWS; } bool LLScriptEditorWSServer::isTightIntegration() { - if (!OPT_TIGHTINTEGRATION) - { - OPT_TIGHTINTEGRATION = new LLCachedControl<bool>(gSavedSettings, "ExternalWebsocketSyncTightIntegration", false); - } - return *OPT_TIGHTINTEGRATION; + static LLCachedControl<bool> OPT_TIGHTINTEGRATION(gSavedSettings, "ExternalWebsocketSyncTightIntegration", false); + return OPT_TIGHTINTEGRATION; } LLScriptEditorWSServer::ptr_t LLScriptEditorWSServer::ensureServerRunning() |
