From b1dcbf1b164762018e82cb834bfaf9e0230155b7 Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Fri, 6 Sep 2019 17:52:27 +0000 Subject: [PATCH] [lldb] Small optimization of FormatMap::Delete and FormatMap::Get llvm-svn: 371234 --- lldb/include/lldb/DataFormatters/FormattersContainer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lldb/include/lldb/DataFormatters/FormattersContainer.h b/lldb/include/lldb/DataFormatters/FormattersContainer.h index 2afe4d4..0c9ddec 100644 --- a/lldb/include/lldb/DataFormatters/FormattersContainer.h +++ b/lldb/include/lldb/DataFormatters/FormattersContainer.h @@ -84,7 +84,7 @@ public: listener->Changed(); } - bool Delete(KeyType name) { + bool Delete(const KeyType &name) { std::lock_guard guard(m_map_mutex); MapIterator iter = m_map.find(name); if (iter == m_map.end()) @@ -102,7 +102,7 @@ public: listener->Changed(); } - bool Get(KeyType name, ValueSP &entry) { + bool Get(const KeyType &name, ValueSP &entry) { std::lock_guard guard(m_map_mutex); MapIterator iter = m_map.find(name); if (iter == m_map.end()) -- 2.7.4