From 63f545c485c063831ecb58fb492f96fe5f462fd1 Mon Sep 17 00:00:00 2001 From: tsepez Date: Tue, 13 Sep 2016 16:08:49 -0700 Subject: CFX_FloatPoint default constructor and equals operators Review-Url: https://codereview.chromium.org/2341453002 --- core/fxcrt/include/fx_coordinates.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'core/fxcrt/include') 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; }; -- cgit v1.2.3