Author: jankratochvil Date: Fri Sep 6 10:52:27 2019 New Revision: 371234 URL: http://llvm.org/viewvc/llvm-project?rev=371234&view=rev Log: [lldb] Small optimization of FormatMap::Delete and FormatMap::Get
Modified: lldb/trunk/include/lldb/DataFormatters/FormattersContainer.h Modified: lldb/trunk/include/lldb/DataFormatters/FormattersContainer.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/DataFormatters/FormattersContainer.h?rev=371234&r1=371233&r2=371234&view=diff ============================================================================== --- lldb/trunk/include/lldb/DataFormatters/FormattersContainer.h (original) +++ lldb/trunk/include/lldb/DataFormatters/FormattersContainer.h Fri Sep 6 10:52:27 2019 @@ -84,7 +84,7 @@ public: listener->Changed(); } - bool Delete(KeyType name) { + bool Delete(const KeyType &name) { std::lock_guard<std::recursive_mutex> 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<std::recursive_mutex> guard(m_map_mutex); MapIterator iter = m_map.find(name); if (iter == m_map.end()) _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits