From 9084a1286c8cd9ead4d6d7bd177a22a3c67d3afb Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Sat, 26 Aug 2017 01:49:44 -0700 Subject: 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 Commit-Queue: Lei Zhang --- core/fxcrt/fx_coordinates.h | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'core/fxcrt') 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; -- cgit v1.2.3