diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2015-05-22 14:02:24 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2015-05-22 14:02:24 -0400 |
commit | 331e932857e1156a68b6d39d3ea2d8c1f39ec7ae (patch) | |
tree | 95f3c0d71ad445b773b2809a82fb5a8dd3a42d71 /indra/llcommon/llsingleton.h | |
parent | 107b9bcb70e785c2d12515e38b8b296eea7ab8d8 (diff) |
MAINT-5232: Clean up some dubious LLSingleton methods.
Remove evil getIfExists() method, used by no one.
Remove evil destroyed() method, used in exactly three places -- one of which
is a test. Replace with equally evil instanceExists() method, which is used
EVERYWHERE -- sigh.
Diffstat (limited to 'indra/llcommon/llsingleton.h')
-rwxr-xr-x | indra/llcommon/llsingleton.h | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/indra/llcommon/llsingleton.h b/indra/llcommon/llsingleton.h index 6e6291a165..a4877eed1f 100755 --- a/indra/llcommon/llsingleton.h +++ b/indra/llcommon/llsingleton.h @@ -166,31 +166,19 @@ public: return NULL; } - static DERIVED_TYPE* getIfExists() - { - return sData.mInstance; - } - // Reference version of getInstance() // Preferred over getInstance() as it disallows checking for NULL static DERIVED_TYPE& instance() { return *getInstance(); } - - // Has this singleton been created uet? - // Use this to avoid accessing singletons before the can safely be constructed + + // Has this singleton been created yet? + // Use this to avoid accessing singletons before they can safely be constructed. static bool instanceExists() { return sData.mInitState == INITIALIZED; } - - // Has this singleton already been deleted? - // Use this to avoid accessing singletons from a static object's destructor - static bool destroyed() - { - return sData.mInitState == DELETED; - } private: |