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

Unified Diff: Source/wtf/HashSet.h

Issue 252633005: Enable WTF::HashSet<OwnPtr<> > (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Met comments from Erik Corry Created 6 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
« no previous file with comments | « Source/wtf/HashFunctions.h ('k') | Source/wtf/HashSetTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/HashSet.h
diff --git a/Source/wtf/HashSet.h b/Source/wtf/HashSet.h
index 28f672742b0b24370589c8d67745dd0b0f941693..ffc5e1844a6cdb2cdbe2d16e58a9d87a7a620dff 100644
--- a/Source/wtf/HashSet.h
+++ b/Source/wtf/HashSet.h
@@ -41,7 +41,8 @@ namespace WTF {
private:
typedef HashArg HashFunctions;
typedef TraitsArg ValueTraits;
- typedef const typename ValueTraits::PeekInType& ValuePeekInType;
+ typedef typename ValueTraits::PeekInType ValuePeekInType;
+ typedef typename ValueTraits::PassInType ValuePassInType;
public:
typedef typename ValueTraits::TraitType ValueType;
@@ -86,7 +87,7 @@ namespace WTF {
// The return value is a pair of an iterator to the new value's location,
// and a bool that is true if an new entry was added.
- AddResult add(ValuePeekInType);
+ AddResult add(ValuePassInType);
// An alternate version of add() that finds the object by hashing and comparing
// with some other type, to avoid the cost of type conversion if the object is already
@@ -188,7 +189,7 @@ namespace WTF {
}
template<typename T, typename U, typename V, typename W>
- inline typename HashSet<T, U, V, W>::AddResult HashSet<T, U, V, W>::add(ValuePeekInType value)
+ inline typename HashSet<T, U, V, W>::AddResult HashSet<T, U, V, W>::add(ValuePassInType value)
{
return m_impl.add(value);
}
@@ -244,7 +245,7 @@ namespace WTF {
for (iterator it = collection.begin(); it != end; ++it)
delete *it;
}
-
+ // Deprecated, HashSet<OwnPtr<>> to be used instead.
template<typename T, typename U, typename V, typename W>
inline void deleteAllValues(const HashSet<T, U, V, W>& collection)
{
« no previous file with comments | « Source/wtf/HashFunctions.h ('k') | Source/wtf/HashSetTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698