Skip to content
Snippets Groups Projects
Commit 13f43fdc authored by Richard Linden's avatar Richard Linden
Browse files

BUILDFIX: mac gcc fix

parent 1225a7a3
No related branches found
No related tags found
No related merge requests found
...@@ -67,6 +67,11 @@ class LLSingleton : private boost::noncopyable ...@@ -67,6 +67,11 @@ class LLSingleton : private boost::noncopyable
INITIALIZED, INITIALIZED,
DELETED DELETED
} EInitState; } EInitState;
static DERIVED_TYPE* constructSingleton()
{
return new DERIVED_TYPE();
}
// stores pointer to singleton instance // stores pointer to singleton instance
struct SingletonLifetimeManager struct SingletonLifetimeManager
...@@ -79,7 +84,7 @@ class LLSingleton : private boost::noncopyable ...@@ -79,7 +84,7 @@ class LLSingleton : private boost::noncopyable
static void construct() static void construct()
{ {
sData.mInitState = CONSTRUCTING; sData.mInitState = CONSTRUCTING;
sData.mInstance = new DERIVED_TYPE(); sData.mInstance = constructSingleton();
sData.mInitState = INITIALIZING; sData.mInitState = INITIALIZING;
} }
......
...@@ -163,7 +163,6 @@ class LLVOCachePartition : public LLViewerOctreePartition, public LLTrace::MemTr ...@@ -163,7 +163,6 @@ class LLVOCachePartition : public LLViewerOctreePartition, public LLTrace::MemTr
class LLVOCache : public LLSingleton<LLVOCache> class LLVOCache : public LLSingleton<LLVOCache>
{ {
private: private:
friend LLSingleton<LLVOCache>;
struct HeaderEntryInfo struct HeaderEntryInfo
{ {
HeaderEntryInfo() : mIndex(0), mHandle(0), mTime(0) {} HeaderEntryInfo() : mIndex(0), mHandle(0), mTime(0) {}
...@@ -194,6 +193,7 @@ class LLVOCache : public LLSingleton<LLVOCache> ...@@ -194,6 +193,7 @@ class LLVOCache : public LLSingleton<LLVOCache>
typedef std::set<HeaderEntryInfo*, header_entry_less> header_entry_queue_t; typedef std::set<HeaderEntryInfo*, header_entry_less> header_entry_queue_t;
typedef std::map<U64, HeaderEntryInfo*> handle_entry_map_t; typedef std::map<U64, HeaderEntryInfo*> handle_entry_map_t;
private: private:
friend class LLSingleton<LLVOCache>;
LLVOCache() ; LLVOCache() ;
public: public:
......
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