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

Unified Diff: gfx/point.h

Issue 3013015: Initial pass at integrating Differ into the chromoting host code.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 | « no previous file | gfx/rect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gfx/point.h
===================================================================
--- gfx/point.h (revision 55264)
+++ gfx/point.h (working copy)
@@ -73,6 +73,16 @@
return !(*this == rhs);
}
+ // A point is less than another point if its y-value is closer
+ // to the origin. If the y-values are the same, then point with
+ // the x-value closer to the origin is considered less than the
+ // other.
+ // This comparison is required to use Points in sets, or sorted
+ // vectors.
+ bool operator<(const Point& rhs) const {
+ return (y_ == rhs.y_) ? (x_ < rhs.x_) : (y_ < rhs.y_);
+ }
+
#if defined(OS_WIN)
POINT ToPOINT() const;
#elif defined(OS_MACOSX)
« no previous file with comments | « no previous file | gfx/rect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698