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

Unified Diff: third_party/WebKit/Source/wtf/HashSetTest.cpp

Issue 1846473002: WTF: Implement move of Deques. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/wtf/HashMapTest.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/wtf/HashSetTest.cpp
diff --git a/third_party/WebKit/Source/wtf/HashSetTest.cpp b/third_party/WebKit/Source/wtf/HashSetTest.cpp
index 87db991bef9d5fc9826f08189e15935ff25e6f82..38046b19e581087d08a8c7101a03d595e6f421dc 100644
--- a/third_party/WebKit/Source/wtf/HashSetTest.cpp
+++ b/third_party/WebKit/Source/wtf/HashSetTest.cpp
@@ -208,11 +208,19 @@ public:
static int* const kDeletedValue;
explicit CountCopy(int* counter = nullptr) : m_counter(counter) { }
- CountCopy(const CountCopy& other) : m_counter(other.m_counter)
+ CountCopy(const CountCopy& other)
+ : m_counter(other.m_counter)
{
if (m_counter && m_counter != kDeletedValue)
++*m_counter;
}
+ CountCopy& operator=(const CountCopy& other)
+ {
+ m_counter = other.m_counter;
+ if (m_counter && m_counter != kDeletedValue)
+ ++*m_counter;
+ return *this;
+ }
const int* counter() const { return m_counter; }
private:
« no previous file with comments | « third_party/WebKit/Source/wtf/HashMapTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698