Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2333)

Unified Diff: Source/wtf/InstanceCounter.cpp

Issue 167123002: Simpler return value from HashTable::add()/HashMap::add() and others (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/wtf/HashTable.h ('k') | Source/wtf/ListHashSet.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/InstanceCounter.cpp
diff --git a/Source/wtf/InstanceCounter.cpp b/Source/wtf/InstanceCounter.cpp
index 8524b685f5c97a4e5300b5257dad94b8aa135a89..19f0bf71d154720e9990de9c74dab519c9b015b1 100644
--- a/Source/wtf/InstanceCounter.cpp
+++ b/Source/wtf/InstanceCounter.cpp
@@ -96,7 +96,7 @@ void InstanceCounter::incrementInstanceCount(const String& instanceName, void* p
MutexLocker locker(m_mutex);
HashMap<String, int>::AddResult result = m_counterMap.add(instanceName, 1);
if (!result.isNewEntry)
- ++(result.iterator->value);
+ ++(result.storedValue->value);
}
void InstanceCounter::decrementInstanceCount(const String& instanceName, void* ptr)
« no previous file with comments | « Source/wtf/HashTable.h ('k') | Source/wtf/ListHashSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698