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

Unified Diff: base/gfx/rect.cc

Issue 93131: Change Size::IsEmpty() to be consistent with Rect::IsEmpty() (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 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 | « base/gfx/rect.h ('k') | base/gfx/rect_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/gfx/rect.cc
===================================================================
--- base/gfx/rect.cc (revision 14559)
+++ base/gfx/rect.cc (working copy)
@@ -90,19 +90,9 @@
#endif
void Rect::set_width(int width) {
- if (width < 0) {
- NOTREACHED();
- width = 0;
- }
-
size_.set_width(width);
}
void Rect::set_height(int height) {
- if (height < 0) {
- NOTREACHED();
- height = 0;
- }
-
size_.set_height(height);
}
@@ -123,10 +113,6 @@
set_y(y() + vertical);
}
-bool Rect::IsEmpty() const {
- return width() == 0 || height() == 0;
-}
-
bool Rect::operator==(const Rect& other) const {
return origin_ == other.origin_ && size_ == other.size_;
}
« no previous file with comments | « base/gfx/rect.h ('k') | base/gfx/rect_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698