From 13f43fdc5bd046f7857f06254c84b8993bdcc50a Mon Sep 17 00:00:00 2001 From: Richard Linden <none@none> Date: Mon, 20 May 2013 18:56:40 -0700 Subject: [PATCH] BUILDFIX: mac gcc fix --- indra/llcommon/llsingleton.h | 7 ++++++- indra/newview/llvocache.h | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/indra/llcommon/llsingleton.h b/indra/llcommon/llsingleton.h index 1e87d9bd7b1..b9cb8e3d418 100644 --- a/indra/llcommon/llsingleton.h +++ b/indra/llcommon/llsingleton.h @@ -67,6 +67,11 @@ class LLSingleton : private boost::noncopyable INITIALIZED, DELETED } EInitState; + + static DERIVED_TYPE* constructSingleton() + { + return new DERIVED_TYPE(); + } // stores pointer to singleton instance struct SingletonLifetimeManager @@ -79,7 +84,7 @@ class LLSingleton : private boost::noncopyable static void construct() { sData.mInitState = CONSTRUCTING; - sData.mInstance = new DERIVED_TYPE(); + sData.mInstance = constructSingleton(); sData.mInitState = INITIALIZING; } diff --git a/indra/newview/llvocache.h b/indra/newview/llvocache.h index fc0634f1335..7409b94d60f 100644 --- a/indra/newview/llvocache.h +++ b/indra/newview/llvocache.h @@ -163,7 +163,6 @@ class LLVOCachePartition : public LLViewerOctreePartition, public LLTrace::MemTr class LLVOCache : public LLSingleton<LLVOCache> { private: - friend LLSingleton<LLVOCache>; struct HeaderEntryInfo { HeaderEntryInfo() : mIndex(0), mHandle(0), mTime(0) {} @@ -194,6 +193,7 @@ class LLVOCache : public LLSingleton<LLVOCache> typedef std::set<HeaderEntryInfo*, header_entry_less> header_entry_queue_t; typedef std::map<U64, HeaderEntryInfo*> handle_entry_map_t; private: + friend class LLSingleton<LLVOCache>; LLVOCache() ; public: -- GitLab