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

Unified Diff: cc/output/bsp_tree_unittest.cc

Issue 1455023002: cc: Replace Pass() with std::move() in some subdirs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pass-cc
Patch Set: pass-cc2: . Created 5 years, 1 month 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 | « cc/output/bsp_tree.cc ('k') | cc/output/compositor_frame.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/bsp_tree_unittest.cc
diff --git a/cc/output/bsp_tree_unittest.cc b/cc/output/bsp_tree_unittest.cc
index 1e34ea14bee424abdeb7c6dcfd49bef5bc9c7d49..f55577be8f581d7aa685de06cdea15d032253ebc 100644
--- a/cc/output/bsp_tree_unittest.cc
+++ b/cc/output/bsp_tree_unittest.cc
@@ -114,9 +114,9 @@ TEST(BspTreeTest, NoSplit) {
CREATE_DRAW_POLYGON(vertices_c, gfx::Vector3dF(0.0f, 0.0f, 1.0f), 2));
std::deque<scoped_ptr<DrawPolygon>> polygon_list;
- polygon_list.push_back(polygon_a.Pass());
- polygon_list.push_back(polygon_b.Pass());
- polygon_list.push_back(polygon_c.Pass());
+ polygon_list.push_back(std::move(polygon_a));
+ polygon_list.push_back(std::move(polygon_b));
+ polygon_list.push_back(std::move(polygon_c));
int compare_ids[] = {1, 0, 2};
std::vector<int> compare_list = INT_VECTOR_FROM_ARRAY(compare_ids);
@@ -142,8 +142,8 @@ TEST(BspTreeTest, BasicSplit) {
CREATE_DRAW_POLYGON(vertices_b, gfx::Vector3dF(-1.0f, 0.0f, 0.0f), 1));
std::deque<scoped_ptr<DrawPolygon>> polygon_list;
- polygon_list.push_back(polygon_a.Pass());
- polygon_list.push_back(polygon_b.Pass());
+ polygon_list.push_back(std::move(polygon_a));
+ polygon_list.push_back(std::move(polygon_b));
int compare_ids[] = {1, 0, 1};
std::vector<int> compare_list = INT_VECTOR_FROM_ARRAY(compare_ids);
@@ -171,8 +171,8 @@ TEST(BspTreeTest, QuadOffset) {
CREATE_DRAW_POLYGON(vertices_b, gfx::Vector3dF(-1.0f, 0.0f, 0.0f), 1));
std::deque<scoped_ptr<DrawPolygon>> polygon_list;
- polygon_list.push_back(polygon_a.Pass());
- polygon_list.push_back(polygon_b.Pass());
+ polygon_list.push_back(std::move(polygon_a));
+ polygon_list.push_back(std::move(polygon_b));
int compare_ids[] = {1, 0};
std::vector<int> compare_list = INT_VECTOR_FROM_ARRAY(compare_ids);
@@ -200,8 +200,8 @@ TEST(BspTreeTest, QuadOffsetSplit) {
CREATE_DRAW_POLYGON(vertices_b, gfx::Vector3dF(-1.0f, 0.0f, 0.0f), 1));
std::deque<scoped_ptr<DrawPolygon>> polygon_list;
- polygon_list.push_back(polygon_b.Pass());
- polygon_list.push_back(polygon_a.Pass());
+ polygon_list.push_back(std::move(polygon_b));
+ polygon_list.push_back(std::move(polygon_a));
int compare_ids[] = {0, 1, 0};
std::vector<int> compare_list = INT_VECTOR_FROM_ARRAY(compare_ids);
@@ -236,9 +236,9 @@ TEST(BspTreeTest, ThreeWaySplit) {
CREATE_DRAW_POLYGON(vertices_c, gfx::Vector3dF(0.0f, 1.0f, 0.0f), 2));
std::deque<scoped_ptr<DrawPolygon>> polygon_list;
- polygon_list.push_back(polygon_a.Pass());
- polygon_list.push_back(polygon_b.Pass());
- polygon_list.push_back(polygon_c.Pass());
+ polygon_list.push_back(std::move(polygon_a));
+ polygon_list.push_back(std::move(polygon_b));
+ polygon_list.push_back(std::move(polygon_c));
int compare_ids[] = {2, 1, 2, 0, 2, 1, 2};
std::vector<int> compare_list = INT_VECTOR_FROM_ARRAY(compare_ids);
@@ -277,9 +277,9 @@ TEST(BspTreeTest, Coplanar) {
{
std::deque<scoped_ptr<DrawPolygon>> polygon_list;
- polygon_list.push_back(polygon_a.Pass());
- polygon_list.push_back(polygon_b.Pass());
- polygon_list.push_back(polygon_c.Pass());
+ polygon_list.push_back(std::move(polygon_a));
+ polygon_list.push_back(std::move(polygon_b));
+ polygon_list.push_back(std::move(polygon_c));
int compare_ids[] = {0, 1, 2};
std::vector<int> compare_list = INT_VECTOR_FROM_ARRAY(compare_ids);
@@ -289,9 +289,9 @@ TEST(BspTreeTest, Coplanar) {
// Now check a different order and ensure we get that back as well
{
std::deque<scoped_ptr<DrawPolygon>> polygon_list;
- polygon_list.push_back(polygon_f.Pass());
- polygon_list.push_back(polygon_d.Pass());
- polygon_list.push_back(polygon_e.Pass());
+ polygon_list.push_back(std::move(polygon_f));
+ polygon_list.push_back(std::move(polygon_d));
+ polygon_list.push_back(std::move(polygon_e));
int compare_ids[] = {0, 1, 2};
std::vector<int> compare_list = INT_VECTOR_FROM_ARRAY(compare_ids);
@@ -334,10 +334,10 @@ TEST(BspTreeTest, CoplanarSplit) {
CREATE_DRAW_POLYGON(vertices_d, gfx::Vector3dF(-1.0f, 0.0f, 0.0f), 3));
std::deque<scoped_ptr<DrawPolygon>> polygon_list;
- polygon_list.push_back(polygon_a.Pass());
- polygon_list.push_back(polygon_b.Pass());
- polygon_list.push_back(polygon_c.Pass());
- polygon_list.push_back(polygon_d.Pass());
+ polygon_list.push_back(std::move(polygon_a));
+ polygon_list.push_back(std::move(polygon_b));
+ polygon_list.push_back(std::move(polygon_c));
+ polygon_list.push_back(std::move(polygon_d));
int compare_ids[] = {3, 0, 1, 2, 3};
std::vector<int> compare_list = INT_VECTOR_FROM_ARRAY(compare_ids);
« no previous file with comments | « cc/output/bsp_tree.cc ('k') | cc/output/compositor_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698