summaryrefslogtreecommitdiff
path: root/indra/newview/llscripteditorws.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2026-07-23 19:33:32 -0700
committerRider Linden <rider@lindenlab.com>2026-07-23 19:33:32 -0700
commit5101e69367293d6d47bdb7383eabe7993e055050 (patch)
treeaa505602a1027d33ad7056dbedd1ba33485e9ec1 /indra/newview/llscripteditorws.cpp
parent285e0a41b0ad676a7015a237dd828eb686da1c14 (diff)
Make the cached controls static to the function.
Diffstat (limited to 'indra/newview/llscripteditorws.cpp')
-rw-r--r--indra/newview/llscripteditorws.cpp17
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()