From e3cb3e9e8d25f52d3127ab959e563b6287d17cdb Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Wed, 14 Oct 2009 23:13:16 +0000 Subject: fixed a bug in LLFastTimer data gathering, and made them even faster (122 cycles on my 2.5Ghz Xeon) can call LLFastTimer::nextFrame with timers still on the stack...first step towards more flexible data gathering LLInstanceTracker works with statically allocated instances now reviewed by Brad --- indra/llcommon/llinstancetracker.h | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'indra/llcommon/llinstancetracker.h') 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& getMap() { - if (! sInstances) - { - sInstances = new std::map; - } + static std::map* sInstances = new std::map(); return *sInstances; } private: KEY mKey; - static std::map* sInstances; }; // explicit specialization for default case where KEY is T* @@ -105,17 +101,10 @@ protected: static std::set& getSet() // called after getReady() but before go() { - if (! sInstances) - { - sInstances = new std::set; - } + static std::set* sInstances = new std::set(); return *sInstances; } - - static std::set* sInstances; }; -template std::map* LLInstanceTracker::sInstances = NULL; -template std::set* LLInstanceTracker::sInstances = NULL; #endif -- cgit v1.2.3