summaryrefslogtreecommitdiffstats
path: root/ui/gfx/rect.h
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-05 18:25:28 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-05 18:25:28 +0000
commitd23f84d28a54b80d57d946963b9c91b5f332a062 (patch)
tree3238a48aad214238b190e80e353ba80ba5cd3090 /ui/gfx/rect.h
parent1423b89d2d0002555f06533539719ae3a7db6009 (diff)
downloadchromium_src-d23f84d28a54b80d57d946963b9c91b5f332a062.zip
chromium_src-d23f84d28a54b80d57d946963b9c91b5f332a062.tar.gz
chromium_src-d23f84d28a54b80d57d946963b9c91b5f332a062.tar.bz2
Make adding and subtracting gfx:: point types simpler.
1) Removed iffy flooring conversion from Float types to Int types. 2) Added methods to convert from Int to Float types so you can do things like add a Point to a PointF and viceversa. 3) Added operator+ and operator- for point types. This had to be done in both Point and PointF headers to allow (Point+PointF) to compile. 4) Move the PointF::~PointF() destructor to the .cc file to be consistent with other types. 5) Remove the unimplemented PointF::PointF(Point) constructor from the header. BUG=152473 R=sky,jamesr Review URL: https://codereview.chromium.org/10993094 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160426 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/rect.h')
-rw-r--r--ui/gfx/rect.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/gfx/rect.h b/ui/gfx/rect.h
index 64f35b1..36f822c 100644
--- a/ui/gfx/rect.h
+++ b/ui/gfx/rect.h
@@ -68,7 +68,7 @@ class UI_EXPORT Rect : public RectBase<Rect, Point, Size, Insets, int> {
CGRect ToCGRect() const;
#endif
- RectF ToRectF() const WARN_UNUSED_RESULT {
+ RectF ToRectF() const {
return RectF(origin().x(), origin().y(), size().width(), size().height());
}