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

Unified Diff: Source/wtf/text/AtomicString.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/RefPtrHashMap.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/text/AtomicString.cpp
diff --git a/Source/wtf/text/AtomicString.cpp b/Source/wtf/text/AtomicString.cpp
index 8ba6875953c4f385e0d8321ce924ea09da93ed9b..7f1e7f3d91b2c1bf07be3ec1453d6bf82c814469 100644
--- a/Source/wtf/text/AtomicString.cpp
+++ b/Source/wtf/text/AtomicString.cpp
@@ -52,7 +52,7 @@ public:
if (!string->length())
return StringImpl::empty();
- StringImpl* result = *m_table.add(string).iterator;
+ StringImpl* result = *m_table.add(string).storedValue;
if (!result->isAtomic())
result->setIsAtomic(true);
@@ -117,7 +117,7 @@ static inline PassRefPtr<StringImpl> addToStringTable(const T& value)
// If the string is newly-translated, then we need to adopt it.
// The boolean in the pair tells us if that is so.
- return addResult.isNewEntry ? adoptRef(*addResult.iterator) : *addResult.iterator;
+ return addResult.isNewEntry ? adoptRef(*addResult.storedValue) : *addResult.storedValue;
}
struct CStringTranslator {
« no previous file with comments | « Source/wtf/RefPtrHashMap.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698