Skip to content

Commit 282ab2f

Browse files
[lldb] Avoid repeated hash lookups (NFC) (#112471)
1 parent b8882be commit 282ab2f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lldb/source/Core/Progress.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,11 @@ void ProgressManager::Decrement(const Progress::ProgressData &progress_data) {
151151
std::lock_guard<std::mutex> lock(m_entries_mutex);
152152
llvm::StringRef key = progress_data.title;
153153

154-
if (!m_entries.contains(key))
154+
auto it = m_entries.find(key);
155+
if (it == m_entries.end())
155156
return;
156157

157-
Entry &entry = m_entries[key];
158+
Entry &entry = it->second;
158159
entry.refcount--;
159160

160161
if (entry.refcount == 0) {

0 commit comments

Comments
 (0)