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

Unified Diff: ui/gfx/size_base.h

Issue 14367021: Rename ClampToMin and ClampToMax (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 7 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 | « ui/gfx/point_unittest.cc ('k') | ui/gfx/size_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/size_base.h
diff --git a/ui/gfx/size_base.h b/ui/gfx/size_base.h
index 57e4700b8ebc7ddda87c96fd17a5e02382206560..6f23fa3cedb0fb239021a5c6b7e7da0279a89224 100644
--- a/ui/gfx/size_base.h
+++ b/ui/gfx/size_base.h
@@ -35,14 +35,14 @@ class UI_EXPORT SizeBase {
height_ = height < 0 ? 0 : height;
}
- void ClampToMax(const Class& max) {
- width_ = width_ <= max.width_ ? width_ : max.width_;
- height_ = height_ <= max.height_ ? height_ : max.height_;
+ void SetToMin(const Class& other) {
+ width_ = width_ <= other.width_ ? width_ : other.width_;
+ height_ = height_ <= other.height_ ? height_ : other.height_;
}
- void ClampToMin(const Class& min) {
- width_ = width_ >= min.width_ ? width_ : min.width_;
- height_ = height_ >= min.height_ ? height_ : min.height_;
+ void SetToMax(const Class& other) {
+ width_ = width_ >= other.width_ ? width_ : other.width_;
+ height_ = height_ >= other.height_ ? height_ : other.height_;
}
bool IsEmpty() const {
« no previous file with comments | « ui/gfx/point_unittest.cc ('k') | ui/gfx/size_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698