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

Unified Diff: third_party/WebKit/Source/platform/geometry/FloatPolygonTest.cpp

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 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
Index: third_party/WebKit/Source/platform/geometry/FloatPolygonTest.cpp
diff --git a/third_party/WebKit/Source/platform/geometry/FloatPolygonTest.cpp b/third_party/WebKit/Source/platform/geometry/FloatPolygonTest.cpp
index a8a1ff917677edcedc5ca17e55d9ff984b23d910..e5cf1e5d36e0a7dc1b8630070eb03546bd30f1e2 100644
--- a/third_party/WebKit/Source/platform/geometry/FloatPolygonTest.cpp
+++ b/third_party/WebKit/Source/platform/geometry/FloatPolygonTest.cpp
@@ -30,6 +30,8 @@
#include "platform/geometry/FloatPolygon.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "wtf/PtrUtil.h"
+#include <memory>
namespace blink {
@@ -38,16 +40,16 @@ public:
FloatPolygonTestValue(const float* coordinates, unsigned coordinatesLength, WindRule fillRule)
{
ASSERT(!(coordinatesLength % 2));
- OwnPtr<Vector<FloatPoint>> vertices = adoptPtr(new Vector<FloatPoint>(coordinatesLength / 2));
+ std::unique_ptr<Vector<FloatPoint>> vertices = wrapUnique(new Vector<FloatPoint>(coordinatesLength / 2));
for (unsigned i = 0; i < coordinatesLength; i += 2)
(*vertices)[i / 2] = FloatPoint(coordinates[i], coordinates[i + 1]);
- m_polygon = adoptPtr(new FloatPolygon(std::move(vertices), fillRule));
+ m_polygon = wrapUnique(new FloatPolygon(std::move(vertices), fillRule));
}
const FloatPolygon& polygon() const { return *m_polygon; }
private:
- OwnPtr<FloatPolygon> m_polygon;
+ std::unique_ptr<FloatPolygon> m_polygon;
};
namespace {

Powered by Google App Engine
This is Rietveld 408576698