Chromium Code Reviews| Index: ui/gfx/rect.h |
| diff --git a/ui/gfx/rect.h b/ui/gfx/rect.h |
| index 64f35b1fe8adde6d9b0e0de6e01b1501ce7e71d3..d1ec196c6083d941ae4015ae146a916982e9d5b3 100644 |
| --- a/ui/gfx/rect.h |
| +++ b/ui/gfx/rect.h |
| @@ -68,19 +68,19 @@ class UI_EXPORT Rect : public RectBase<Rect, Point, Size, Insets, int> { |
| CGRect ToCGRect() const; |
| #endif |
| - RectF ToRectF() const WARN_UNUSED_RESULT { |
| - return RectF(origin().x(), origin().y(), size().width(), size().height()); |
| - } |
| - |
| RectF Scale(float scale) const WARN_UNUSED_RESULT { |
| return Scale(scale, scale); |
| } |
| RectF Scale(float x_scale, float y_scale) const WARN_UNUSED_RESULT { |
| - return ToRectF().Scale(x_scale, y_scale); |
| + return static_cast<RectF>(*this).Scale(x_scale, y_scale); |
| } |
| std::string ToString() const; |
| + |
| + operator RectF() const WARN_UNUSED_RESULT { |
|
sky
2012/09/28 23:05:49
Why WARN_UNUSED_RESULT?
danakj
2012/09/28 23:19:14
removed.
|
| + return RectF(origin().x(), origin().y(), size().width(), size().height()); |
| + } |
| }; |
| #if !defined(COMPILER_MSVC) |