summaryrefslogtreecommitdiffstats
path: root/cc/quads/draw_polygon.cc
diff options
context:
space:
mode:
Diffstat (limited to 'cc/quads/draw_polygon.cc')
-rw-r--r--cc/quads/draw_polygon.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/cc/quads/draw_polygon.cc b/cc/quads/draw_polygon.cc
index bfc2b492..71dbf36 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 {