diff options
author | Lei Zhang <thestig@chromium.org> | 2017-08-26 01:49:44 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-08-28 19:20:53 +0000 |
commit | 9084a1286c8cd9ead4d6d7bd177a22a3c67d3afb (patch) | |
tree | fdca0d663a448ef5512dc34b04786b75558ef669 /core/fxcrt/fx_coordinates.h | |
parent | 61cb1121729d7e5f53c95077dcc57a61b3f575e8 (diff) | |
download | pdfium-9084a1286c8cd9ead4d6d7bd177a22a3c67d3afb.tar.xz |
Remove unused / rarely used CFX_PTemplate methods.
CFX_Point and CFX_PointF are derived from CFX_PTemplate.
Add a helper function to replace the rarely used method where its used.
Change-Id: I28448d44bbae9aa6773d1ad5fd7daf342b67c84c
Reviewed-on: https://pdfium-review.googlesource.com/12071
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fxcrt/fx_coordinates.h')
-rw-r--r-- | core/fxcrt/fx_coordinates.h | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/core/fxcrt/fx_coordinates.h b/core/fxcrt/fx_coordinates.h index a4074a4afa..d84b866a57 100644 --- a/core/fxcrt/fx_coordinates.h +++ b/core/fxcrt/fx_coordinates.h @@ -20,10 +20,7 @@ class CFX_PTemplate { CFX_PTemplate() : x(0), y(0) {} CFX_PTemplate(BaseType new_x, BaseType new_y) : x(new_x), y(new_y) {} CFX_PTemplate(const CFX_PTemplate& other) : x(other.x), y(other.y) {} - void clear() { - x = 0; - y = 0; - } + CFX_PTemplate operator=(const CFX_PTemplate& other) { if (this != &other) { x = other.x; @@ -47,28 +44,12 @@ class CFX_PTemplate { y -= obj.y; return *this; } - CFX_PTemplate& operator*=(BaseType factor) { - x *= factor; - y *= factor; - return *this; - } - CFX_PTemplate& operator/=(BaseType divisor) { - x /= divisor; - y /= divisor; - return *this; - } CFX_PTemplate operator+(const CFX_PTemplate& other) const { return CFX_PTemplate(x + other.x, y + other.y); } CFX_PTemplate operator-(const CFX_PTemplate& other) const { return CFX_PTemplate(x - other.x, y - other.y); } - CFX_PTemplate operator*(BaseType factor) const { - return CFX_PTemplate(x * factor, y * factor); - } - CFX_PTemplate operator/(BaseType divisor) const { - return CFX_PTemplate(x / divisor, y / divisor); - } BaseType x; BaseType y; |