summaryrefslogtreecommitdiff
path: root/indra/llui/lluictrlfactory.h
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2012-07-11 14:13:45 -0400
committerNat Goodspeed <nat@lindenlab.com>2012-07-11 14:13:45 -0400
commit709c1eeae90dae106800e3742f3655bd7b590b7b (patch)
tree1ab0bb907be2ce303b3290bbffa7c119f8f3051d /indra/llui/lluictrlfactory.h
parent578d70dec0a01b5ed7b461c38503c082ac1a3608 (diff)
MAINT-1175: Properly pass LLRegistry's COMPARATOR to underlying map.
Although LLRegistry and LLRegistrySingleton have always defined a COMPARATOR template parameter, it wasn't used for the underlying map. Therefore every type, including any pointer type, was being compared using std::less. This happens to work most of the time -- but is tripping us up now. Pass COMPARATOR to underlying std::map. Fix a couple minor bugs in LLRegistryDefaultComparator (never before used!). Specialize for const char*. Remove CompareTypeID and LLCompareTypeID because we now actively forbid using LLRegistry<std::type_info*, ...>; remove only known reference (LLWidgetNameRegistry definition).
Diffstat (limited to 'indra/llui/lluictrlfactory.h')
-rw-r--r--indra/llui/lluictrlfactory.h11
1 files changed, 1 insertions, 10 deletions
diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h
index 1f7a8e08ce..a5fd83e555 100644
--- a/indra/llui/lluictrlfactory.h
+++ b/indra/llui/lluictrlfactory.h
@@ -34,15 +34,6 @@
class LLView;
-// sort functor for typeid maps
-struct LLCompareTypeID
-{
- bool operator()(const std::type_info* lhs, const std::type_info* rhs) const
- {
- return lhs->before(*rhs);
- }
-};
-
// lookup widget constructor funcs by widget name
template <typename DERIVED_TYPE>
class LLChildRegistry : public LLRegistrySingleton<std::string, LLWidgetCreatorFunc, DERIVED_TYPE>
@@ -71,7 +62,7 @@ protected:
// lookup widget name by type (actually by std::type_info::name())
class LLWidgetNameRegistry
-: public LLRegistrySingleton<const char*, std::string, LLWidgetNameRegistry , LLCompareTypeID>
+: public LLRegistrySingleton<const char*, std::string, LLWidgetNameRegistry>
{};
// lookup function for generating empty param block by widget type