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

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

Issue 2796163002: Migrate WTF::HashCountedSet::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
« no previous file with comments | « third_party/WebKit/Source/platform/loader/fetch/Resource.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/wtf/HashCountedSet.h
diff --git a/third_party/WebKit/Source/platform/wtf/HashCountedSet.h b/third_party/WebKit/Source/platform/wtf/HashCountedSet.h
index 8f26e5c5ec96686bc0aa03587e2a4cefedd1acf0..38cf4b6f50768706a25811459d011c0f973d3014 100644
--- a/third_party/WebKit/Source/platform/wtf/HashCountedSet.h
+++ b/third_party/WebKit/Source/platform/wtf/HashCountedSet.h
@@ -86,10 +86,10 @@ class HashCountedSet {
// Increases the count if an equal value is already present 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(const ValueType&);
+ AddResult insert(const ValueType&);
// Generalized add(), adding the value N times.
- AddResult add(const ValueType&, unsigned);
+ AddResult insert(const ValueType&, unsigned);
// Reduces the count of the value, and removes it if count goes down to
// zero, returns true if the value is removed.
@@ -116,7 +116,7 @@ class HashCountedSet {
template <typename T, typename U, typename V, typename W>
inline typename HashCountedSet<T, U, V, W>::AddResult
-HashCountedSet<T, U, V, W>::add(const ValueType& value, unsigned count) {
+HashCountedSet<T, U, V, W>::insert(const ValueType& value, unsigned count) {
DCHECK_GT(count, 0u);
AddResult result = m_impl.insert(value, 0);
result.storedValue->value += count;
@@ -125,8 +125,8 @@ HashCountedSet<T, U, V, W>::add(const ValueType& value, unsigned count) {
template <typename T, typename U, typename V, typename W>
inline typename HashCountedSet<T, U, V, W>::AddResult
-HashCountedSet<T, U, V, W>::add(const ValueType& value) {
- return add(value, 1u);
+HashCountedSet<T, U, V, W>::insert(const ValueType& value) {
+ return insert(value, 1u);
}
template <typename T, typename U, typename V, typename W>
« no previous file with comments | « third_party/WebKit/Source/platform/loader/fetch/Resource.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698