From 7058ca869e3d7ec4e26e886b2e78a895b78a5035 Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Mon, 25 Jan 2021 00:23:01 -0500 Subject: [PATCH] Clean up stupid LLSingleton macro --- indra/llcommon/llsingleton.h | 17 +---------------- indra/newview/altoolalign.h | 2 +- indra/newview/llenvironment.h | 2 +- indra/newview/llvoiceclient.h | 4 ++-- indra/newview/rlvmodifiers.h | 2 +- 5 files changed, 6 insertions(+), 21 deletions(-) diff --git a/indra/llcommon/llsingleton.h b/indra/llcommon/llsingleton.h index 8c233b274db..0ef36548ea7 100644 --- a/indra/llcommon/llsingleton.h +++ b/indra/llcommon/llsingleton.h @@ -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 diff --git a/indra/newview/altoolalign.h b/indra/newview/altoolalign.h index aece53e8c7f..06d6d94dde8 100644 --- a/indra/newview/altoolalign.h +++ b/indra/newview/altoolalign.h @@ -17,7 +17,7 @@ class LLToolSelectRect; class ALToolAlign final : public LLTool, public LLSingleton<ALToolAlign> { - LLSINGLETON_C11(ALToolAlign); + LLSINGLETON(ALToolAlign); ~ALToolAlign() = default; public: diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 38e5359ba28..e4a43528b3a 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -48,7 +48,7 @@ class LLParcel; //------------------------------------------------------------------------- class LLEnvironment final : public LLSingleton<LLEnvironment> { - LLSINGLETON_C11(LLEnvironment); + LLSINGLETON(LLEnvironment); LOG_CLASS(LLEnvironment); public: diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h index 5b2f10c4073..5c06c8eaf30 100644 --- a/indra/newview/llvoiceclient.h +++ b/indra/newview/llvoiceclient.h @@ -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: diff --git a/indra/newview/rlvmodifiers.h b/indra/newview/rlvmodifiers.h index c690fb328b0..85668c2f06b 100644 --- a/indra/newview/rlvmodifiers.h +++ b/indra/newview/rlvmodifiers.h @@ -92,7 +92,7 @@ struct RlvBehaviourModifierTween class RlvBehaviourModifierAnimator final : public LLSingleton<RlvBehaviourModifierAnimator> { - LLSINGLETON_EMPTY_CTOR_C11(RlvBehaviourModifierAnimator); + LLSINGLETON_EMPTY_CTOR(RlvBehaviourModifierAnimator); public: ~RlvBehaviourModifierAnimator() override; -- GitLab