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

Unified Diff: Source/core/inspector/DOMPatchSupport.cpp

Issue 152883002: (Concept patch) Simplify WTF::HashTable::add() return value for size and performance (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 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/inspector/DOMPatchSupport.cpp
diff --git a/Source/core/inspector/DOMPatchSupport.cpp b/Source/core/inspector/DOMPatchSupport.cpp
index a5dc95cd7136982cfe4566cfd082ff96a7f8c83e..813c063dd00aa547ae43b85b87c488aab864f591 100644
--- a/Source/core/inspector/DOMPatchSupport.cpp
+++ b/Source/core/inspector/DOMPatchSupport.cpp
@@ -244,13 +244,11 @@ DOMPatchSupport::diff(const Vector<OwnPtr<Digest> >& oldList, const Vector<OwnPt
DiffTable oldTable;
for (size_t i = 0; i < newList.size(); ++i) {
- DiffTable::iterator it = newTable.add(newList[i]->m_sha1, Vector<size_t>()).iterator;
- it->value.append(i);
+ newTable.add(newList[i]->m_sha1, Vector<size_t>()).iterator->value.append(i);
}
for (size_t i = 0; i < oldList.size(); ++i) {
- DiffTable::iterator it = oldTable.add(oldList[i]->m_sha1, Vector<size_t>()).iterator;
- it->value.append(i);
+ oldTable.add(oldList[i]->m_sha1, Vector<size_t>()).iterator->value.append(i);
}
for (DiffTable::iterator newIt = newTable.begin(); newIt != newTable.end(); ++newIt) {

Powered by Google App Engine
This is Rietveld 408576698