From 9875889910585b08d2abd372ddc95469baf1a7e9 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 15 Mar 2018 15:02:22 +0000 Subject: Use Width()/Height() methods from rectangles. Change-Id: I07f4363046be920816e8d0dae766c7af833284db Reviewed-on: https://pdfium-review.googlesource.com/28582 Commit-Queue: dsinclair Reviewed-by: dsinclair --- core/fxcrt/fx_coordinates.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/fxcrt/fx_coordinates.cpp') diff --git a/core/fxcrt/fx_coordinates.cpp b/core/fxcrt/fx_coordinates.cpp index d25a754d7a..bd06ce1473 100644 --- a/core/fxcrt/fx_coordinates.cpp +++ b/core/fxcrt/fx_coordinates.cpp @@ -136,8 +136,8 @@ FX_RECT CFX_FloatRect::GetClosestRect() const { } CFX_FloatRect CFX_FloatRect::GetCenterSquare() const { - float fWidth = right - left; - float fHeight = top - bottom; + float fWidth = Width(); + float fHeight = Height(); float fHalfWidth = (fWidth > fHeight) ? fHeight / 2 : fWidth / 2; float fCenterX = (left + right) / 2.0f; -- cgit v1.2.3