Index: ui/gfx/size_base.h |
diff --git a/ui/gfx/size_base.h b/ui/gfx/size_base.h |
index 0ec62e499e2aa9258815d1f6064be90c74d3d2db..3d171f1cce011b9075251d3032465f04b72bd95d 100644 |
--- a/ui/gfx/size_base.h |
+++ b/ui/gfx/size_base.h |
@@ -28,8 +28,8 @@ class UI_EXPORT SizeBase { |
set_height(height_ + height); |
} |
- void set_width(Type width) { width_ = width; } |
- void set_height(Type height) { height_ = height; } |
+ void set_width(Type width); |
+ void set_height(Type height); |
void ClampToMax(const Class& max) { |
width_ = width_ <= max.width_ ? width_ : max.width_; |
@@ -42,20 +42,11 @@ class UI_EXPORT SizeBase { |
} |
bool IsEmpty() const { |
- return (width_ <= 0) || (height_ <= 0); |
- } |
- |
- void ClampToNonNegative() { |
- if (width_ < 0) |
- width_ = 0; |
- if (height_ < 0) |
- height_ = 0; |
+ return (width_ == 0) || (height_ == 0); |
} |
protected: |
- SizeBase(Type width, Type height) |
- : width_(width), |
- height_(height) {} |
+ SizeBase(Type width, Type height); |
// Destructor is intentionally made non virtual and protected. |
// Do not make this public. |