diff options
| author | Oz Linden <oz@lindenlab.com> | 2011-04-06 07:32:56 -0400 |
|---|---|---|
| committer | Oz Linden <oz@lindenlab.com> | 2011-04-06 07:32:56 -0400 |
| commit | f41cbc0ac85ae328f2701aab23e94c0ef7ab5758 (patch) | |
| tree | c0593e4d79918dc10173de5d3dfbb34e8c2ed40e /indra/llcommon/llinstancetracker.cpp | |
| parent | 85c97c19347c1409f8f7231940b0b8f3a57fc0a5 (diff) | |
| parent | b5c834c6fdcee7d7238bebfc561ecee3ecca3589 (diff) | |
merge changes for storm-1094
Diffstat (limited to 'indra/llcommon/llinstancetracker.cpp')
| -rw-r--r-- | indra/llcommon/llinstancetracker.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/indra/llcommon/llinstancetracker.cpp b/indra/llcommon/llinstancetracker.cpp index 89bc6cca39..f576204511 100644 --- a/indra/llcommon/llinstancetracker.cpp +++ b/indra/llcommon/llinstancetracker.cpp @@ -32,6 +32,17 @@ // external library headers // other Linden headers -// llinstancetracker.h is presently header-only. This file exists only because our CMake -// test macro ADD_BUILD_TEST requires it. -int dummy = 0; +//static +void * & LLInstanceTrackerBase::getInstances(std::type_info const & info) +{ + static std::map<std::string, void *> instances; + + std::string k = info.name(); + if(instances.find(k) == instances.end()) + { + instances[k] = NULL; + } + + return instances[k]; +} + |
