summaryrefslogtreecommitdiff
path: root/indra/llcommon/llstl.h
diff options
context:
space:
mode:
authorRye Mutt <rye@alchemyviewer.org>2024-07-01 22:25:56 -0400
committerRye Mutt <rye@alchemyviewer.org>2024-07-01 22:25:56 -0400
commitb0e30477e93bb16b0cf8c7b64aaee35cedf85ca8 (patch)
treed8e0c8eca6f078395d0bc581925f589adc67d895 /indra/llcommon/llstl.h
parent49d60e0ded52c095c834e9ca134b67282728b389 (diff)
Use heterogeneous comparison for string_view map finds in LLControl and convert controlExists to string_view
Diffstat (limited to 'indra/llcommon/llstl.h')
-rw-r--r--indra/llcommon/llstl.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/indra/llcommon/llstl.h b/indra/llcommon/llstl.h
index 1b52d94258..e3999cbdaa 100644
--- a/indra/llcommon/llstl.h
+++ b/indra/llcommon/llstl.h
@@ -226,11 +226,11 @@ void delete_and_clear_array(T*& ptr)
// foo[2] = "hello";
// const char* bar = get_ptr_in_map(foo, 2); // bar -> "hello"
// const char* baz = get_ptr_in_map(foo, 3); // baz == NULL
-template <typename K, typename T>
-inline T* get_ptr_in_map(const std::map<K,T*>& inmap, const K& key)
+template <typename T>
+inline typename T::mapped_type get_ptr_in_map(const T& inmap, typename T::key_type const& key)
{
// Typedef here avoids warnings because of new c++ naming rules.
- typedef typename std::map<K,T*>::const_iterator map_iter;
+ typedef T::const_iterator map_iter;
map_iter iter = inmap.find(key);
if(iter == inmap.end())
{