Chromium Code Reviews| Index: ui/gfx/rect.h |
| diff --git a/ui/gfx/rect.h b/ui/gfx/rect.h |
| index 076f9fc08f525d67b7a8fe75dad2cf9507160d9b..da1d1f15fb0c28c62e2bd29a19bfa1c89791f768 100644 |
| --- a/ui/gfx/rect.h |
| +++ b/ui/gfx/rect.h |
| @@ -37,9 +37,16 @@ class Insets; |
| class UI_EXPORT Rect |
| : public RectBase<Rect, Point, Size, Insets, Vector2d, int> { |
| public: |
| - Rect(); |
| - Rect(int width, int height); |
| - Rect(int x, int y, int width, int height); |
| + Rect() : RectBase<Rect, Point, Size, Insets, Vector2d, int> (Point()) {} |
| + |
| + Rect(int width, int height) |
| + : RectBase<Rect, Point, Size, Insets, Vector2d, int> (Size(width, height)) |
| + {} |
| + |
| + Rect(int x, int y, int width, int height) |
| + : RectBase<Rect, Point, Size, Insets, Vector2d, int>(Point(x, y), |
| + Size(width, height)) {} |
|
danakj
2012/11/29 18:36:44
the rect_f.h changes look a lot cleaner than these
jamesr
2012/11/29 22:40:40
I can try to reformat to match that. There's no r
|
| + |
| #if defined(OS_WIN) |
| explicit Rect(const RECT& r); |
| #elif defined(OS_MACOSX) |
| @@ -47,10 +54,14 @@ class UI_EXPORT Rect |
| #elif defined(TOOLKIT_GTK) |
| explicit Rect(const GdkRectangle& r); |
| #endif |
| - explicit Rect(const gfx::Size& size); |
| - Rect(const gfx::Point& origin, const gfx::Size& size); |
| - ~Rect(); |
| + explicit Rect(const gfx::Size& size) |
| + : RectBase<Rect, Point, Size, Insets, Vector2d, int> (size) {} |
| + |
| + Rect(const gfx::Point& origin, const gfx::Size& size) |
| + : RectBase<Rect, Point, Size, Insets, Vector2d, int> (origin, size) {} |
|
danakj
2012/11/29 18:36:44
should be 4 spaces before : right?
|
| + |
| + ~Rect() {} |
| #if defined(OS_WIN) |
| // Construct an equivalent Win32 RECT object. |