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

Unified Diff: ui/gfx/point_f.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
Index: ui/gfx/point_f.h
diff --git a/ui/gfx/point_f.h b/ui/gfx/point_f.h
index 9b2e9340f32cd00b2ead2c9f9504d6a6797c0e60..7a828befcd163da693d5b381b608d0b566c39f0f 100644
--- a/ui/gfx/point_f.h
+++ b/ui/gfx/point_f.h
@@ -53,7 +53,7 @@ inline PointF operator-(const PointF& lhs, const Vector2dF& rhs) {
}
inline Vector2dF operator-(const PointF& lhs, const PointF& rhs) {
- return lhs.OffsetFrom(rhs);
+ return Vector2dF(lhs.x() - rhs.x(), lhs.y() - rhs.y());
}
inline PointF PointAtOffsetFromOrigin(const Vector2dF& offset_from_origin) {
« .gitmodules ('K') | « ui/gfx/point_base.h ('k') | ui/gfx/point_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698