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

Unified Diff: cc/quads/draw_polygon.cc

Issue 609663003: cc: Remove use of PassAs() and constructor-casting with scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cc-passas: PassAs-presubmit-warning Created 6 years, 3 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 | « cc/output/software_renderer_unittest.cc ('k') | cc/quads/render_pass_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/quads/draw_polygon.cc
diff --git a/cc/quads/draw_polygon.cc b/cc/quads/draw_polygon.cc
index bfc2b49296d0e09891a3df43e13531449b92ea75..71dbf366dab963a13958b57eedffc7c85ee2deb0 100644
--- a/cc/quads/draw_polygon.cc
+++ b/cc/quads/draw_polygon.cc
@@ -76,7 +76,7 @@ DrawPolygon::~DrawPolygon() {
}
scoped_ptr<DrawPolygon> DrawPolygon::CreateCopy() {
- DrawPolygon* new_polygon = new DrawPolygon();
+ scoped_ptr<DrawPolygon> new_polygon(new DrawPolygon());
new_polygon->order_index_ = order_index_;
new_polygon->original_ref_ = original_ref_;
new_polygon->points_.reserve(points_.size());
@@ -84,7 +84,7 @@ scoped_ptr<DrawPolygon> DrawPolygon::CreateCopy() {
new_polygon->normal_.set_x(normal_.x());
new_polygon->normal_.set_y(normal_.y());
new_polygon->normal_.set_z(normal_.z());
- return scoped_ptr<DrawPolygon>(new_polygon);
+ return new_polygon.Pass();
}
float DrawPolygon::SignedPointDistance(const gfx::Point3F& point) const {
« no previous file with comments | « cc/output/software_renderer_unittest.cc ('k') | cc/quads/render_pass_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698