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

Unified Diff: third_party/WebKit/Source/platform/wtf/LinkedHashSet.h

Issue 2804953004: Migrate WTF::HashTable::add() to ::insert() (Closed)
Patch Set: Created 3 years, 8 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: third_party/WebKit/Source/platform/wtf/LinkedHashSet.h
diff --git a/third_party/WebKit/Source/platform/wtf/LinkedHashSet.h b/third_party/WebKit/Source/platform/wtf/LinkedHashSet.h
index 67ec1a1de37583db43d1de34abd2306c83ee8ebb..741b74a68267fd3789173bb6daacf37db242f8db 100644
--- a/third_party/WebKit/Source/platform/wtf/LinkedHashSet.h
+++ b/third_party/WebKit/Source/platform/wtf/LinkedHashSet.h
@@ -284,7 +284,7 @@ class LinkedHashSet {
IncomingValueType&& newValue);
template <typename IncomingValueType>
AddResult insertBefore(iterator it, IncomingValueType&& newValue) {
- return m_impl.template add<NodeHashFunctions>(
+ return m_impl.template insert<NodeHashFunctions>(
std::forward<IncomingValueType>(newValue), it.getNode());
}
@@ -814,7 +814,7 @@ template <typename IncomingValueType>
typename LinkedHashSet<Value, HashFunctions, Traits, Allocator>::AddResult
LinkedHashSet<Value, HashFunctions, Traits, Allocator>::insert(
IncomingValueType&& value) {
- return m_impl.template add<NodeHashFunctions>(
+ return m_impl.template insert<NodeHashFunctions>(
std::forward<IncomingValueType>(value), &m_anchor);
}
@@ -822,8 +822,9 @@ template <typename T, typename U, typename V, typename W>
template <typename IncomingValueType>
typename LinkedHashSet<T, U, V, W>::iterator
LinkedHashSet<T, U, V, W>::addReturnIterator(IncomingValueType&& value) {
- typename ImplType::AddResult result = m_impl.template add<NodeHashFunctions>(
- std::forward<IncomingValueType>(value), &m_anchor);
+ typename ImplType::AddResult result =
+ m_impl.template insert<NodeHashFunctions>(
+ std::forward<IncomingValueType>(value), &m_anchor);
return makeIterator(result.storedValue);
}
@@ -831,8 +832,9 @@ template <typename T, typename U, typename V, typename W>
template <typename IncomingValueType>
typename LinkedHashSet<T, U, V, W>::AddResult
LinkedHashSet<T, U, V, W>::appendOrMoveToLast(IncomingValueType&& value) {
- typename ImplType::AddResult result = m_impl.template add<NodeHashFunctions>(
- std::forward<IncomingValueType>(value), &m_anchor);
+ typename ImplType::AddResult result =
+ m_impl.template insert<NodeHashFunctions>(
+ std::forward<IncomingValueType>(value), &m_anchor);
Node* node = result.storedValue;
if (!result.isNewEntry) {
node->unlink();
@@ -845,8 +847,9 @@ template <typename T, typename U, typename V, typename W>
template <typename IncomingValueType>
typename LinkedHashSet<T, U, V, W>::AddResult
LinkedHashSet<T, U, V, W>::prependOrMoveToFirst(IncomingValueType&& value) {
- typename ImplType::AddResult result = m_impl.template add<NodeHashFunctions>(
- std::forward<IncomingValueType>(value), m_anchor.m_next);
+ typename ImplType::AddResult result =
+ m_impl.template insert<NodeHashFunctions>(
+ std::forward<IncomingValueType>(value), m_anchor.m_next);
Node* node = result.storedValue;
if (!result.isNewEntry) {
node->unlink();
« no previous file with comments | « third_party/WebKit/Source/platform/wtf/HashTable.h ('k') | third_party/WebKit/Source/platform/wtf/ListHashSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698