summaryrefslogtreecommitdiff
path: root/core/fxcrt
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-09-13 16:08:49 -0700
committerCommit bot <commit-bot@chromium.org>2016-09-13 16:08:49 -0700
commit63f545c485c063831ecb58fb492f96fe5f462fd1 (patch)
tree8c57386bc84f7173b780a7e8bf79a19ec7c3231e /core/fxcrt
parentf86ca3884886506c999a3b521078151e7cda0bf9 (diff)
downloadpdfium-63f545c485c063831ecb58fb492f96fe5f462fd1.tar.xz
CFX_FloatPoint default constructor and equals operatorschromium/2860
Review-Url: https://codereview.chromium.org/2341453002
Diffstat (limited to 'core/fxcrt')
-rw-r--r--core/fxcrt/include/fx_coordinates.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/fxcrt/include/fx_coordinates.h b/core/fxcrt/include/fx_coordinates.h
index 7da6057ed4..bfdc46cbf2 100644
--- a/core/fxcrt/include/fx_coordinates.h
+++ b/core/fxcrt/include/fx_coordinates.h
@@ -179,8 +179,14 @@ struct FX_RECT {
// LBRT rectangles (y-axis runs upwards).
class CFX_FloatPoint {
public:
+ CFX_FloatPoint() : x(0.0f), y(0.0f) {}
CFX_FloatPoint(FX_FLOAT xx, FX_FLOAT yy) : x(xx), y(yy) {}
+ bool operator==(const CFX_FloatPoint& that) const {
+ return x == that.x && y == that.y;
+ }
+ bool operator!=(const CFX_FloatPoint& that) const { return !(*this == that); }
+
FX_FLOAT x;
FX_FLOAT y;
};