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

Unified Diff: ui/gfx/point.h

Issue 11293194: ui: Prefer +/- operators to apply offsets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: floats Created 8 years, 1 month 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
« .gitmodules ('K') | « ui/gfx/pango_util.cc ('k') | ui/gfx/point_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/point.h
diff --git a/ui/gfx/point.h b/ui/gfx/point.h
index f81dd90f935c3a874321746b1ce2aadeffaf7cc8..4404582fb427f4ec655e9a6ebfa52348a340a5e6 100644
--- a/ui/gfx/point.h
+++ b/ui/gfx/point.h
@@ -74,7 +74,7 @@ inline Point operator-(const Point& lhs, const Vector2d& rhs) {
}
inline Vector2d operator-(const Point& lhs, const Point& rhs) {
- return lhs.OffsetFrom(rhs);
+ return Vector2d(lhs.x() - rhs.x(), lhs.y() - rhs.y());
}
inline Point PointAtOffsetFromOrigin(const Vector2d& offset_from_origin) {
« .gitmodules ('K') | « ui/gfx/pango_util.cc ('k') | ui/gfx/point_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698