summaryrefslogtreecommitdiff
path: root/indra/llcommon/llinstancetracker.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcommon/llinstancetracker.h')
-rw-r--r--indra/llcommon/llinstancetracker.h15
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