summaryrefslogtreecommitdiff
path: root/indra/llcommon/llregistry.h
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2012-04-11 11:05:21 -0400
committerNat Goodspeed <nat@lindenlab.com>2012-04-11 11:05:21 -0400
commit46a7cdd2866c4219bb690974d9d6266e6994b431 (patch)
tree8ad7c096bf74fb923ac0a692d3f05f08c8e7305a /indra/llcommon/llregistry.h
parent51018f38a25bb9d43775ccd8702525a6f16186fa (diff)
parent5459f2ee987014e88ece017632d73829d844cb6f (diff)
Merge daggy fix c167ae699e17 for Linux UI issues.
Diffstat (limited to 'indra/llcommon/llregistry.h')
-rw-r--r--indra/llcommon/llregistry.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/indra/llcommon/llregistry.h b/indra/llcommon/llregistry.h
index 36ce6a97b7..36d7f7a44c 100644
--- a/indra/llcommon/llregistry.h
+++ b/indra/llcommon/llregistry.h
@@ -31,6 +31,7 @@
#include <boost/type_traits.hpp>
#include "llsingleton.h"
+#include "lltypeinfolookup.h"
template <typename T>
class LLRegistryDefaultComparator
@@ -38,6 +39,24 @@ class LLRegistryDefaultComparator
bool operator()(const T& lhs, const T& rhs) { return lhs < rhs; }
};
+template <typename KEY, typename VALUE>
+struct LLRegistryMapSelector
+{
+ typedef std::map<KEY, VALUE> type;
+};
+
+template <typename VALUE>
+struct LLRegistryMapSelector<std::type_info*, VALUE>
+{
+ typedef LLTypeInfoLookup<VALUE> type;
+};
+
+template <typename VALUE>
+struct LLRegistryMapSelector<const std::type_info*, VALUE>
+{
+ typedef LLTypeInfoLookup<VALUE> type;
+};
+
template <typename KEY, typename VALUE, typename COMPARATOR = LLRegistryDefaultComparator<KEY> >
class LLRegistry
{
@@ -53,7 +72,7 @@ public:
{
friend class LLRegistry<KEY, VALUE, COMPARATOR>;
public:
- typedef typename std::map<KEY, VALUE> registry_map_t;
+ typedef typename LLRegistryMapSelector<KEY, VALUE>::type registry_map_t;
bool add(ref_const_key_t key, ref_const_value_t value)
{