diff options
| author | Mark Palange (Mani) <palange@lindenlab.com> | 2009-10-16 16:42:45 -0700 |
|---|---|---|
| committer | Mark Palange (Mani) <palange@lindenlab.com> | 2009-10-16 16:42:45 -0700 |
| commit | 3e10fa4d51a23bf6f1ced23e8d90c636d84fa5db (patch) | |
| tree | d4991e4c1a9dd934f48d33804e55eb8ffa085679 /indra/llcommon/llinstancetracker.h | |
| parent | e9f7205ba9f4dfb3422759218609b62d61972722 (diff) | |
| parent | f20e9521a9b70f4e83cbb6888feae08a70681ea7 (diff) | |
merge from latest svn/viewer-2-0 to hg/viewer-2-0
Diffstat (limited to 'indra/llcommon/llinstancetracker.h')
| -rw-r--r-- | indra/llcommon/llinstancetracker.h | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/indra/llcommon/llinstancetracker.h b/indra/llcommon/llinstancetracker.h index ea50acbbc5..de25e364fa 100644 --- a/indra/llcommon/llinstancetracker.h +++ b/indra/llcommon/llinstancetracker.h @@ -71,17 +71,13 @@ private: static std::map<KEY, T*>& getMap() { - if (! sInstances) - { - sInstances = new std::map<KEY, T*>; - } + static std::map<KEY, T*>* sInstances = new std::map<KEY, T*>(); return *sInstances; } private: KEY mKey; - static std::map<KEY, T*>* sInstances; }; // explicit specialization for default case where KEY is T* @@ -105,17 +101,10 @@ protected: static std::set<T*>& getSet() // called after getReady() but before go() { - if (! sInstances) - { - sInstances = new std::set<T*>; - } + static std::set<T*>* sInstances = new std::set<T*>(); return *sInstances; } - - static std::set<T*>* sInstances; }; -template <typename T, typename KEY> std::map<KEY, T*>* LLInstanceTracker<T, KEY>::sInstances = NULL; -template <typename T> std::set<T*>* LLInstanceTracker<T, T*>::sInstances = NULL; #endif |
