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

Side by Side Diff: third_party/WebKit/Source/wtf/HashTable.h

Issue 2696183002: Migrate WTF::HashSet::remove() to ::erase() [part 1] (Closed)
Patch Set: one more platform-specific reference 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All rights 2 * Copyright (C) 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * Copyright (C) 2008 David Levin <levin@chromium.org> 4 * Copyright (C) 2008 David Levin <levin@chromium.org>
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 2251 matching lines...) Expand 10 before | Expand all | Expand 10 after
2262 return a.m_impl != b.m_impl; 2262 return a.m_impl != b.m_impl;
2263 } 2263 }
2264 2264
2265 template <typename Collection1, typename Collection2> 2265 template <typename Collection1, typename Collection2>
2266 inline void removeAll(Collection1& collection, const Collection2& toBeRemoved) { 2266 inline void removeAll(Collection1& collection, const Collection2& toBeRemoved) {
2267 if (collection.isEmpty() || toBeRemoved.isEmpty()) 2267 if (collection.isEmpty() || toBeRemoved.isEmpty())
2268 return; 2268 return;
2269 typedef typename Collection2::const_iterator CollectionIterator; 2269 typedef typename Collection2::const_iterator CollectionIterator;
2270 CollectionIterator end(toBeRemoved.end()); 2270 CollectionIterator end(toBeRemoved.end());
2271 for (CollectionIterator it(toBeRemoved.begin()); it != end; ++it) 2271 for (CollectionIterator it(toBeRemoved.begin()); it != end; ++it)
2272 collection.remove(*it); 2272 collection.erase(*it);
2273 } 2273 }
2274 2274
2275 } // namespace WTF 2275 } // namespace WTF
2276 2276
2277 #include "wtf/HashIterators.h" 2277 #include "wtf/HashIterators.h"
2278 2278
2279 #endif // WTF_HashTable_h 2279 #endif // WTF_HashTable_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/HashSetTest.cpp ('k') | third_party/WebKit/Source/wtf/VectorTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698