Skip to content
Snippets Groups Projects
Commit 7058ca86 authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Clean up stupid LLSingleton macro

parent f33c07f3
No related branches found
No related tags found
No related merge requests found
......@@ -799,23 +799,12 @@ class LLLockedSingleton : public LLParamSingleton<DT>
* errors at link time.
*/
#define LLSINGLETON(DERIVED_CLASS, ...) \
private: \
/* implement LLSingleton pure virtual method whose sole purpose */ \
/* is to remind people to use this macro */ \
virtual void you_must_use_LLSINGLETON_macro() {} \
friend class LLSingleton<DERIVED_CLASS>; \
DERIVED_CLASS(__VA_ARGS__)
/**
* A slight variance from the above, but includes the "override" keyword
*/
#define LLSINGLETON_C11(DERIVED_CLASS) \
private: \
/* implement LLSingleton pure virtual method whose sole purpose */ \
/* is to remind people to use this macro */ \
virtual void you_must_use_LLSINGLETON_macro() override {} \
friend class LLSingleton<DERIVED_CLASS>; \
DERIVED_CLASS()
DERIVED_CLASS(__VA_ARGS__)
/**
* Use LLSINGLETON_EMPTY_CTOR(Foo); at the start of an LLSingleton<Foo>
......@@ -835,8 +824,4 @@ private: \
/* LLSINGLETON() is carefully implemented to permit exactly this */ \
LLSINGLETON(DERIVED_CLASS) = default;
#define LLSINGLETON_EMPTY_CTOR_C11(DERIVED_CLASS) \
/* LLSINGLETON() is carefully implemented to permit exactly this */ \
LLSINGLETON_C11(DERIVED_CLASS) = default;
#endif
......@@ -17,7 +17,7 @@ class LLToolSelectRect;
class ALToolAlign final
: public LLTool, public LLSingleton<ALToolAlign>
{
LLSINGLETON_C11(ALToolAlign);
LLSINGLETON(ALToolAlign);
~ALToolAlign() = default;
public:
......
......@@ -48,7 +48,7 @@ class LLParcel;
//-------------------------------------------------------------------------
class LLEnvironment final : public LLSingleton<LLEnvironment>
{
LLSINGLETON_C11(LLEnvironment);
LLSINGLETON(LLEnvironment);
LOG_CLASS(LLEnvironment);
public:
......
......@@ -499,8 +499,8 @@ class LLVoiceClient final : public LLParamSingleton<LLVoiceClient>
**/
class LLSpeakerVolumeStorage final : public LLSingleton<LLSpeakerVolumeStorage>
{
LLSINGLETON_C11(LLSpeakerVolumeStorage);
~LLSpeakerVolumeStorage();
LLSINGLETON(LLSpeakerVolumeStorage);
~LLSpeakerVolumeStorage() override;
LOG_CLASS(LLSpeakerVolumeStorage);
protected:
......
......@@ -92,7 +92,7 @@ struct RlvBehaviourModifierTween
class RlvBehaviourModifierAnimator final : public LLSingleton<RlvBehaviourModifierAnimator>
{
LLSINGLETON_EMPTY_CTOR_C11(RlvBehaviourModifierAnimator);
LLSINGLETON_EMPTY_CTOR(RlvBehaviourModifierAnimator);
public:
~RlvBehaviourModifierAnimator() override;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment