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

Unified Diff: third_party/WebKit/Source/core/layout/shapes/Shape.cpp

Issue 1979183002: Remove OwnPtr::release() calls in core/ (part 3). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with trunk. Created 4 years, 7 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/core/layout/shapes/Shape.cpp
diff --git a/third_party/WebKit/Source/core/layout/shapes/Shape.cpp b/third_party/WebKit/Source/core/layout/shapes/Shape.cpp
index 176bd3e640dfdb6715be33b8ca71f336f845568b..76e973ce3fdce7c00b4c9e779e66e7e7a90f7dd4 100644
--- a/third_party/WebKit/Source/core/layout/shapes/Shape.cpp
+++ b/third_party/WebKit/Source/core/layout/shapes/Shape.cpp
@@ -142,7 +142,7 @@ PassOwnPtr<Shape> Shape::createShape(const BasicShape* basicShape, const LayoutS
floatValueForLength(values.at(i + 1), boxHeight));
(*vertices)[i / 2] = physicalPointToLogical(vertex, logicalBoxSize.height().toFloat(), writingMode);
}
- shape = createPolygonShape(vertices.release(), polygon->getWindRule());
+ shape = createPolygonShape(std::move(vertices), polygon->getWindRule());
break;
}
@@ -176,16 +176,16 @@ PassOwnPtr<Shape> Shape::createShape(const BasicShape* basicShape, const LayoutS
shape->m_writingMode = writingMode;
shape->m_margin = margin;
- return shape.release();
+ return shape;
}
PassOwnPtr<Shape> Shape::createEmptyRasterShape(WritingMode writingMode, float margin)
{
OwnPtr<RasterShapeIntervals> intervals = adoptPtr(new RasterShapeIntervals(0, 0));
- OwnPtr<RasterShape> rasterShape = adoptPtr(new RasterShape(intervals.release(), IntSize()));
+ OwnPtr<RasterShape> rasterShape = adoptPtr(new RasterShape(std::move(intervals), IntSize()));
rasterShape->m_writingMode = writingMode;
rasterShape->m_margin = margin;
- return rasterShape.release();
+ return std::move(rasterShape);
}
PassOwnPtr<Shape> Shape::createRasterShape(Image* image, float threshold, const LayoutRect& imageR, const LayoutRect& marginR, WritingMode writingMode, float margin)
@@ -234,10 +234,10 @@ PassOwnPtr<Shape> Shape::createRasterShape(Image* image, float threshold, const
}
}
- OwnPtr<RasterShape> rasterShape = adoptPtr(new RasterShape(intervals.release(), marginRect.size()));
+ OwnPtr<RasterShape> rasterShape = adoptPtr(new RasterShape(std::move(intervals), marginRect.size()));
rasterShape->m_writingMode = writingMode;
rasterShape->m_margin = margin;
- return rasterShape.release();
+ return std::move(rasterShape);
}
PassOwnPtr<Shape> Shape::createLayoutBoxShape(const FloatRoundedRect& roundedRect, WritingMode writingMode, float margin)
@@ -248,7 +248,7 @@ PassOwnPtr<Shape> Shape::createLayoutBoxShape(const FloatRoundedRect& roundedRec
shape->m_writingMode = writingMode;
shape->m_margin = margin;
- return shape.release();
+ return shape;
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698