summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2021-11-04 16:40:05 -0400
committerNat Goodspeed <nat@lindenlab.com>2021-11-04 16:40:05 -0400
commit8458ad8890cf0a11804996210d7bcfbdaa3eec2e (patch)
treef4d748b54657f81893e9ccc1d974129cbcca3ff2 /indra
parent7a5b92199598be0fc5a2702d071afda06e6ae59f (diff)
SL-16202: Instantiate LLSimpleton::sInstance generically
instead of requiring a separate declaration for each subclass. The previous way produces errors in clang.
Diffstat (limited to 'indra')
-rw-r--r--indra/llcommon/llsingleton.h3
-rw-r--r--indra/llui/llviewereventrecorder.cpp2
-rw-r--r--indra/newview/llenvironment.cpp1
-rw-r--r--indra/newview/llselectmgr.cpp2
-rw-r--r--indra/newview/llviewercamera.cpp2
-rw-r--r--indra/newview/llworld.cpp2
6 files changed, 3 insertions, 9 deletions
diff --git a/indra/llcommon/llsingleton.h b/indra/llcommon/llsingleton.h
index 10a8ecfedb..24d01812c9 100644
--- a/indra/llcommon/llsingleton.h
+++ b/indra/llcommon/llsingleton.h
@@ -865,4 +865,7 @@ public:
}
};
+template <class T>
+T* LLSimpleton<T>::sInstance{ nullptr };
+
#endif
diff --git a/indra/llui/llviewereventrecorder.cpp b/indra/llui/llviewereventrecorder.cpp
index 5a44ec947a..cb000aef74 100644
--- a/indra/llui/llviewereventrecorder.cpp
+++ b/indra/llui/llviewereventrecorder.cpp
@@ -28,8 +28,6 @@
#include "llui.h"
#include "llleap.h"
-LLViewerEventRecorder* LLSimpleton<LLViewerEventRecorder>::sInstance = nullptr;
-
LLViewerEventRecorder::LLViewerEventRecorder() {
clear(UNDEFINED);
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index dba24b3d02..1a66f10b8f 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -824,7 +824,6 @@ std::string env_selection_to_string(LLEnvironment::EnvSelection_t sel)
#undef RTNENUM
}
-LLEnvironment* LLSimpleton<LLEnvironment>::sInstance = nullptr;
//-------------------------------------------------------------------------
LLEnvironment::LLEnvironment():
mCloudScrollDelta(),
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 53247031b4..bc00c518e9 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -97,8 +97,6 @@
#include "llglheaders.h"
#include "llinventoryobserver.h"
-LLSelectMgr* LLSimpleton<LLSelectMgr>::sInstance = nullptr;
-
LLViewerObject* getSelectedParentObject(LLViewerObject *object) ;
//
// Consts
diff --git a/indra/newview/llviewercamera.cpp b/indra/newview/llviewercamera.cpp
index 5ebce115f6..5d8e80cc41 100644
--- a/indra/newview/llviewercamera.cpp
+++ b/indra/newview/llviewercamera.cpp
@@ -54,8 +54,6 @@
// System includes
#include <iomanip> // for setprecision
-LLViewerCamera* LLSimpleton<LLViewerCamera>::sInstance = nullptr;
-
LLTrace::CountStatHandle<> LLViewerCamera::sVelocityStat("camera_velocity");
LLTrace::CountStatHandle<> LLViewerCamera::sAngularVelocityStat("camera_angular_velocity");
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index 0a8457eb2c..5f62908009 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -62,8 +62,6 @@
#include <cstring>
-LLWorld* LLSimpleton<LLWorld>::sInstance = nullptr;
-
//
// Globals
//