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

Unified Diff: cc/base/math_util.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/animation/timing_function.cc ('k') | cc/base/region.cc » ('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 5b01da998d9138bf8da81711c262240b5bafb3c6..7ed0c9a8b712e75931bc3420aec581da2e5b66c2 100644
--- a/cc/base/math_util.cc
+++ b/cc/base/math_util.cc
@@ -693,7 +693,7 @@ scoped_ptr<base::Value> MathUtil::AsValue(const gfx::Size& s) {
scoped_ptr<base::DictionaryValue> res(new base::DictionaryValue());
res->SetDouble("width", s.width());
res->SetDouble("height", s.height());
- return res.PassAs<base::Value>();
+ return res.Pass();
}
scoped_ptr<base::Value> MathUtil::AsValue(const gfx::Rect& r) {
@@ -702,7 +702,7 @@ scoped_ptr<base::Value> MathUtil::AsValue(const gfx::Rect& r) {
res->AppendInteger(r.y());
res->AppendInteger(r.width());
res->AppendInteger(r.height());
- return res.PassAs<base::Value>();
+ return res.Pass();
}
bool MathUtil::FromValue(const base::Value* raw_value, gfx::Rect* out_rect) {
@@ -730,7 +730,7 @@ scoped_ptr<base::Value> MathUtil::AsValue(const gfx::PointF& pt) {
scoped_ptr<base::ListValue> res(new base::ListValue());
res->AppendDouble(pt.x());
res->AppendDouble(pt.y());
- return res.PassAs<base::Value>();
+ return res.Pass();
}
void MathUtil::AddToTracedValue(const gfx::Size& s,
« no previous file with comments | « cc/animation/timing_function.cc ('k') | cc/base/region.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698