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

Unified Diff: Source/platform/graphics/ListContainer.h

Issue 1207773003: Add ListContainer::swap (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Refactor for clairty Created 5 years, 6 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 | « no previous file | Source/platform/graphics/ListContainerTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/ListContainer.h
diff --git a/Source/platform/graphics/ListContainer.h b/Source/platform/graphics/ListContainer.h
index a63bffb698daf568c48aa1fe1cae414a7fefd40e..6d5f22ddc4772866346cdad32741666e34cbecd2 100644
--- a/Source/platform/graphics/ListContainer.h
+++ b/Source/platform/graphics/ListContainer.h
@@ -264,6 +264,12 @@ public:
return new (*at) DerivedElementType();
}
+ template <typename DerivedElementType>
+ void swap(ListContainer<DerivedElementType>& other)
+ {
+ m_data.swap(other.m_data);
+ }
+
// Appends a new item without copying. The original item will not be
// destructed and will be replaced with a new DerivedElementType. The
// DerivedElementType does not have to match the moved type as a full block
« no previous file with comments | « no previous file | Source/platform/graphics/ListContainerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698