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

Unified Diff: third_party/WebKit/Source/platform/inspector_protocol/CollectionsWTF.h

Issue 1880833002: Move to protocol::Vector (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved hash to a String16STL.h (not yet in this repo) Created 4 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
Index: third_party/WebKit/Source/platform/inspector_protocol/CollectionsWTF.h
diff --git a/third_party/WebKit/Source/platform/inspector_protocol/CollectionsWTF.h b/third_party/WebKit/Source/platform/inspector_protocol/CollectionsWTF.h
index 47986cca614b79fa230685289d885dde3355e10f..f2728e7567a9417e4828e8f0dad1eb42e0b7c1f8 100644
--- a/third_party/WebKit/Source/platform/inspector_protocol/CollectionsWTF.h
+++ b/third_party/WebKit/Source/platform/inspector_protocol/CollectionsWTF.h
@@ -40,7 +40,7 @@ public:
void prepend(const T& t) { m_impl.prepend(t); }
void remove(size_t i) { m_impl.remove(i); }
void clear() { m_impl.clear(); }
- void swap(Vector& other) { m_impl.swap(other.m_impl); }
+ void swap(Vector<T>& other) { m_impl.swap(other.m_impl); }
void removeLast() { m_impl.removeLast(); }
private:
@@ -53,6 +53,7 @@ class Vector<OwnPtr<T>> {
public:
Vector() { }
Vector(size_t capacity) : m_impl(capacity) { }
+ Vector(Vector<OwnPtr<T>>&& other) : m_impl(std::move(other.m_impl)) { }
~Vector() { }
typedef OwnPtr<T>* iterator;
@@ -76,7 +77,8 @@ public:
void prepend(PassOwnPtr<T> t) { m_impl.prepend(t); }
void remove(size_t i) { m_impl.remove(i); }
void clear() { m_impl.clear(); }
- void swap(Vector& other) { m_impl.swap(other.m_impl); }
+ void swap(Vector<OwnPtr<T>>& other) { m_impl.swap(other.m_impl); }
+ void swap(Vector<OwnPtr<T>>&& other) { m_impl.swap(other.m_impl); }
void removeLast() { m_impl.removeLast(); }
private:

Powered by Google App Engine
This is Rietveld 408576698