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

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

Issue 2724363002: Migrate WTF::LinkedHashSet/ListHashSet::add() to ::insert() (Closed)
Patch Set: Created 3 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: third_party/WebKit/Source/wtf/LinkedHashSet.h
diff --git a/third_party/WebKit/Source/wtf/LinkedHashSet.h b/third_party/WebKit/Source/wtf/LinkedHashSet.h
index a57c9da7fdf6080ab4224042a857bc747a934a0e..1a380b432e5fea800cbbbd8c533d40918261208a 100644
--- a/third_party/WebKit/Source/wtf/LinkedHashSet.h
+++ b/third_party/WebKit/Source/wtf/LinkedHashSet.h
@@ -257,14 +257,12 @@ class LinkedHashSet {
template <typename HashTranslator, typename T>
bool contains(const T&) const;
- // The return value of add is a pair of a pointer to the stored value,
+ // The return value of insert is a pair of a pointer to the stored value,
// and a bool that is true if an new entry was added.
template <typename IncomingValueType>
- AddResult add(IncomingValueType&&);
- template <typename IncomingValueType>
AddResult insert(IncomingValueType&&);
- // Same as add() except that the return value is an
+ // Same as insert() except that the return value is an
// iterator. Useful in cases where it's needed to have the
// same return value as find() and where it's not possible to
// use a pointer to the storedValue.
@@ -665,7 +663,7 @@ inline LinkedHashSet<T, U, V, W>::LinkedHashSet(const LinkedHashSet& other)
: m_anchor() {
const_iterator end = other.end();
for (const_iterator it = other.begin(); it != end; ++it)
- add(*it);
+ insert(*it);
}
template <typename T, typename U, typename V, typename W>
@@ -814,23 +812,12 @@ template <typename Value,
typename Allocator>
template <typename IncomingValueType>
typename LinkedHashSet<Value, HashFunctions, Traits, Allocator>::AddResult
-LinkedHashSet<Value, HashFunctions, Traits, Allocator>::add(
+LinkedHashSet<Value, HashFunctions, Traits, Allocator>::insert(
IncomingValueType&& value) {
return m_impl.template add<NodeHashFunctions>(
std::forward<IncomingValueType>(value), &m_anchor);
}
-template <typename Value,
- typename HashFunctions,
- typename Traits,
- typename Allocator>
-template <typename IncomingValueType>
-typename LinkedHashSet<Value, HashFunctions, Traits, Allocator>::AddResult
-LinkedHashSet<Value, HashFunctions, Traits, Allocator>::insert(
- IncomingValueType&& value) {
- return add(value);
-}
-
template <typename T, typename U, typename V, typename W>
template <typename IncomingValueType>
typename LinkedHashSet<T, U, V, W>::iterator
« no previous file with comments | « third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp ('k') | third_party/WebKit/Source/wtf/ListHashSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698