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

Unified Diff: core/fxcrt/include/fx_coordinates.h

Issue 2341453002: CFX_FloatPoint default constructor and equals operators (Closed)
Patch Set: style Created 4 years, 3 months 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
« no previous file with comments | « core/fpdfdoc/include/cpvt_word.h ('k') | fpdfsdk/cpdfsdk_widget.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxcrt/include/fx_coordinates.h
diff --git a/core/fxcrt/include/fx_coordinates.h b/core/fxcrt/include/fx_coordinates.h
index 7da6057ed4d7f75b1471e44d399805dab3ef4a14..bfdc46cbf29770924de6ac4bb94e77190885fa86 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;
};
« no previous file with comments | « core/fpdfdoc/include/cpvt_word.h ('k') | fpdfsdk/cpdfsdk_widget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698