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

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

Issue 2688893002: Migrate WTF::HashSet::add() to ::insert() [continued] (Closed)
Patch Set: fix HeapTest issues 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 a5c0b598b961c19af5535bfabbb21c8cec3526a8..a57c9da7fdf6080ab4224042a857bc747a934a0e 100644
--- a/third_party/WebKit/Source/wtf/LinkedHashSet.h
+++ b/third_party/WebKit/Source/wtf/LinkedHashSet.h
@@ -261,6 +261,8 @@ class LinkedHashSet {
// 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
// iterator. Useful in cases where it's needed to have the
@@ -818,6 +820,17 @@ LinkedHashSet<Value, HashFunctions, Traits, Allocator>::add(
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

Powered by Google App Engine
This is Rietveld 408576698