SL-16202: Instantiate LLSimpleton::sInstance generically

instead of requiring a separate declaration for each subclass.

The previous way produces errors in clang.
master
Nat Goodspeed 2021-11-04 16:40:05 -04:00
parent 7a5b921995
commit 8458ad8890
6 changed files with 3 additions and 9 deletions

View File

@ -865,4 +865,7 @@ public:
}
};
template <class T>
T* LLSimpleton<T>::sInstance{ nullptr };
#endif

View File

@ -28,8 +28,6 @@
#include "llui.h"
#include "llleap.h"
LLViewerEventRecorder* LLSimpleton<LLViewerEventRecorder>::sInstance = nullptr;
LLViewerEventRecorder::LLViewerEventRecorder() {
clear(UNDEFINED);

View File

@ -824,7 +824,6 @@ std::string env_selection_to_string(LLEnvironment::EnvSelection_t sel)
#undef RTNENUM
}
LLEnvironment* LLSimpleton<LLEnvironment>::sInstance = nullptr;
//-------------------------------------------------------------------------
LLEnvironment::LLEnvironment():
mCloudScrollDelta(),

View File

@ -97,8 +97,6 @@
#include "llglheaders.h"
#include "llinventoryobserver.h"
LLSelectMgr* LLSimpleton<LLSelectMgr>::sInstance = nullptr;
LLViewerObject* getSelectedParentObject(LLViewerObject *object) ;
//
// Consts

View File

@ -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");

View File

@ -62,8 +62,6 @@
#include <cstring>
LLWorld* LLSimpleton<LLWorld>::sInstance = nullptr;
//
// Globals
//