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

Unified Diff: Source/wtf/RefPtrHashMap.h

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/ListHashSet.h ('k') | Source/wtf/text/AtomicString.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/RefPtrHashMap.h
diff --git a/Source/wtf/RefPtrHashMap.h b/Source/wtf/RefPtrHashMap.h
index 2fa418420ae79ad84a6484461bd65cd45fe4f50b..009bbc4f5f38ca43e5c3fbc20025a8c46b6142eb 100644
--- a/Source/wtf/RefPtrHashMap.h
+++ b/Source/wtf/RefPtrHashMap.h
@@ -217,7 +217,7 @@ namespace WTF {
AddResult result = inlineAdd(key, mapped);
if (!result.isNewEntry) {
// The inlineAdd call above found an existing hash table entry; we need to set the mapped value.
- MappedTraits::store(mapped, result.iterator->value);
+ MappedTraits::store(mapped, result.storedValue->value);
}
return result;
}
@@ -229,7 +229,7 @@ namespace WTF {
AddResult result = inlineAdd(key, mapped);
if (!result.isNewEntry) {
// The inlineAdd call above found an existing hash table entry; we need to set the mapped value.
- MappedTraits::store(mapped, result.iterator->value);
+ MappedTraits::store(mapped, result.storedValue->value);
}
return result;
}
« no previous file with comments | « Source/wtf/ListHashSet.h ('k') | Source/wtf/text/AtomicString.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698