diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-09 18:20:37 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-09 18:20:37 +0000 |
commit | 0872ffcfbc2e1dfdca3d1fbda5e3416c1214b4b4 (patch) | |
tree | 512901c50f52358af6030f2739636aefc9492388 /ui/gfx/point_f.h | |
parent | 21eec7b3ced5a264f55c1c040ed6899ac58c97d5 (diff) | |
download | chromium_src-0872ffcfbc2e1dfdca3d1fbda5e3416c1214b4b4.zip chromium_src-0872ffcfbc2e1dfdca3d1fbda5e3416c1214b4b4.tar.gz chromium_src-0872ffcfbc2e1dfdca3d1fbda5e3416c1214b4b4.tar.bz2 |
ui: Remove gfx::Point Add() and Subtract() which were non-mutating member methods.
Replace use of these with operator +, +=, -, -=.
Covered by existing unit tests.
R=sky
BUG=158416,160158
Review URL: https://chromiumcodereview.appspot.com/11362173
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166933 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/point_f.h')
-rw-r--r-- | ui/gfx/point_f.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ui/gfx/point_f.h b/ui/gfx/point_f.h index 3e69bd7..46bd8e2 100644 --- a/ui/gfx/point_f.h +++ b/ui/gfx/point_f.h @@ -41,11 +41,15 @@ inline bool operator!=(const PointF& lhs, const PointF& rhs) { } inline PointF operator+(const PointF& lhs, const Vector2dF& rhs) { - return lhs.Add(rhs); + PointF result(lhs); + result += rhs; + return result; } inline PointF operator-(const PointF& lhs, const Vector2dF& rhs) { - return lhs.Subtract(rhs); + PointF result(lhs); + result -= rhs; + return result; } inline Vector2dF operator-(const PointF& lhs, const PointF& rhs) { |