diff options
author | Lei Zhang <thestig@chromium.org> | 2018-10-15 18:12:40 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-10-15 18:12:40 +0000 |
commit | bc75f62774a31ca94188e1910624bac246d550f7 (patch) | |
tree | c9826fe551d97a076d092a38109810e97fc80e44 /core | |
parent | d7f51c715146be53186b25ca677e49e164b51527 (diff) | |
download | pdfium-bc75f62774a31ca94188e1910624bac246d550f7.tar.xz |
Make fxjs/ pass gn check.
Use allow_circular_includes_from as a crutch for now.
Change-Id: I8c53bafd864048506a77354f57e27cac50369005
Reviewed-on: https://pdfium-review.googlesource.com/c/43989
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core')
-rw-r--r-- | core/fxge/cfx_color.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/core/fxge/cfx_color.h b/core/fxge/cfx_color.h index aaa533cacb..d6fabad989 100644 --- a/core/fxge/cfx_color.h +++ b/core/fxge/cfx_color.h @@ -61,4 +61,18 @@ struct CFX_Color { float fColor4; }; +inline bool operator==(const CFX_Color& c1, const CFX_Color& c2) { + return c1.nColorType == c2.nColorType && c1.fColor1 - c2.fColor1 < 0.0001 && + c1.fColor1 - c2.fColor1 > -0.0001 && + c1.fColor2 - c2.fColor2 < 0.0001 && + c1.fColor2 - c2.fColor2 > -0.0001 && + c1.fColor3 - c2.fColor3 < 0.0001 && + c1.fColor3 - c2.fColor3 > -0.0001 && + c1.fColor4 - c2.fColor4 < 0.0001 && c1.fColor4 - c2.fColor4 > -0.0001; +} + +inline bool operator!=(const CFX_Color& c1, const CFX_Color& c2) { + return !(c1 == c2); +} + #endif // CORE_FXGE_CFX_COLOR_H_ |