Index: ui/gfx/geometry/size.h |
diff --git a/ui/gfx/geometry/size.h b/ui/gfx/geometry/size.h |
index 8c2f778494ae32b92703fa98810499391b9a84a8..6eb05227aba19f2bfd791b4c56340fb01da4e8d3 100644 |
--- a/ui/gfx/geometry/size.h |
+++ b/ui/gfx/geometry/size.h |
@@ -24,15 +24,13 @@ namespace gfx { |
// A size has width and height values. |
class GFX_EXPORT Size { |
public: |
- Size() : width_(0), height_(0) {} |
- Size(int width, int height) |
+ constexpr Size() : width_(0), height_(0) {} |
+ constexpr Size(int width, int height) |
: width_(width < 0 ? 0 : width), height_(height < 0 ? 0 : height) {} |
#if defined(OS_MACOSX) |
explicit Size(const CGSize& s); |
#endif |
- ~Size() {} |
- |
#if defined(OS_MACOSX) |
Size& operator=(const CGSize& s); |
#endif |
@@ -43,8 +41,8 @@ class GFX_EXPORT Size { |
CGSize ToCGSize() const; |
#endif |
- int width() const { return width_; } |
- int height() const { return height_; } |
+ constexpr int width() const { return width_; } |
+ constexpr int height() const { return height_; } |
void set_width(int width) { width_ = width < 0 ? 0 : width; } |
void set_height(int height) { height_ = height < 0 ? 0 : height; } |