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

Unified Diff: cc/base/math_util.cc

Issue 1866203004: Convert //cc from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrcc: rebase Created 4 years, 8 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/base/math_util.h ('k') | cc/base/region.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/base/math_util.cc
diff --git a/cc/base/math_util.cc b/cc/base/math_util.cc
index 147b4005e4e576a18f6be80104bbd17ce7270e0d..d078fb6c8efbed76b8e6281536acfd9d1604f529 100644
--- a/cc/base/math_util.cc
+++ b/cc/base/math_util.cc
@@ -705,15 +705,15 @@ gfx::Vector2dF MathUtil::ProjectVector(const gfx::Vector2dF& source,
projected_length * destination.y());
}
-scoped_ptr<base::Value> MathUtil::AsValue(const gfx::Size& s) {
- scoped_ptr<base::DictionaryValue> res(new base::DictionaryValue());
+std::unique_ptr<base::Value> MathUtil::AsValue(const gfx::Size& s) {
+ std::unique_ptr<base::DictionaryValue> res(new base::DictionaryValue());
res->SetDouble("width", s.width());
res->SetDouble("height", s.height());
return std::move(res);
}
-scoped_ptr<base::Value> MathUtil::AsValue(const gfx::Rect& r) {
- scoped_ptr<base::ListValue> res(new base::ListValue());
+std::unique_ptr<base::Value> MathUtil::AsValue(const gfx::Rect& r) {
+ std::unique_ptr<base::ListValue> res(new base::ListValue());
res->AppendInteger(r.x());
res->AppendInteger(r.y());
res->AppendInteger(r.width());
@@ -742,8 +742,8 @@ bool MathUtil::FromValue(const base::Value* raw_value, gfx::Rect* out_rect) {
return true;
}
-scoped_ptr<base::Value> MathUtil::AsValue(const gfx::PointF& pt) {
- scoped_ptr<base::ListValue> res(new base::ListValue());
+std::unique_ptr<base::Value> MathUtil::AsValue(const gfx::PointF& pt) {
+ std::unique_ptr<base::ListValue> res(new base::ListValue());
res->AppendDouble(pt.x());
res->AppendDouble(pt.y());
return std::move(res);
« no previous file with comments | « cc/base/math_util.h ('k') | cc/base/region.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698