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

Unified Diff: Source/core/rendering/FastTextAutosizer.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
Index: Source/core/rendering/FastTextAutosizer.cpp
diff --git a/Source/core/rendering/FastTextAutosizer.cpp b/Source/core/rendering/FastTextAutosizer.cpp
index 79ef19a3b1485270ddcec3e6596aa87a3e8e03f7..c38341caa9a03c5df5fa52a458963f340c4d7952 100644
--- a/Source/core/rendering/FastTextAutosizer.cpp
+++ b/Source/core/rendering/FastTextAutosizer.cpp
@@ -279,10 +279,10 @@ FastTextAutosizer::Supercluster* FastTextAutosizer::getSupercluster(const Render
SuperclusterMap::AddResult addResult = m_superclusters.add(fingerprint, PassOwnPtr<Supercluster>());
if (!addResult.isNewEntry)
- return addResult.iterator->value.get();
+ return addResult.storedValue->value.get();
Supercluster* supercluster = new Supercluster(roots);
- addResult.iterator->value = adoptPtr(supercluster);
+ addResult.storedValue->value = adoptPtr(supercluster);
return supercluster;
}
@@ -502,8 +502,8 @@ void FastTextAutosizer::FingerprintMapper::add(const RenderBlock* block, AtomicS
ReverseFingerprintMap::AddResult addResult = m_blocksForFingerprint.add(fingerprint, PassOwnPtr<BlockSet>());
if (addResult.isNewEntry)
- addResult.iterator->value = adoptPtr(new BlockSet);
- addResult.iterator->value->add(block);
+ addResult.storedValue->value = adoptPtr(new BlockSet);
+ addResult.storedValue->value->add(block);
}
void FastTextAutosizer::FingerprintMapper::remove(const RenderBlock* block)
« no previous file with comments | « Source/core/page/scrolling/ScrollingCoordinator.cpp ('k') | Source/core/rendering/RenderBlockLineLayout.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698