From cede561c5ae665a563409ba3bfc93c3cd6da5248 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Tue, 31 Jul 2018 16:41:47 +0000 Subject: Remove CXFA_Corner downcasts from cxfa_rectangle.cpp We don't need anything that the parent class can't provide, so avoid dubious casting. Change-Id: I9f3d9735f3bfbcf005865772af31817c2b8addef Reviewed-on: https://pdfium-review.googlesource.com/39270 Reviewed-by: Lei Zhang Commit-Queue: Tom Sepez --- xfa/fxfa/parser/cxfa_rectangle.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xfa/fxfa/parser/cxfa_rectangle.cpp b/xfa/fxfa/parser/cxfa_rectangle.cpp index 632c782c39..31a19bd1f7 100644 --- a/xfa/fxfa/parser/cxfa_rectangle.cpp +++ b/xfa/fxfa/parser/cxfa_rectangle.cpp @@ -111,8 +111,8 @@ void CXFA_Rectangle::GetFillPath(const std::vector& strokes, float nx = 1.0f; float ny = 1.0f; CFX_PointF cp1, cp2; - auto* corner1 = static_cast(strokes[i]); - auto* corner2 = static_cast(strokes[(i + 2) % 8]); + CXFA_Stroke* corner1 = strokes[i]; + CXFA_Stroke* corner2 = strokes[(i + 2) % 8]; float fRadius1 = corner1->GetRadius(); float fRadius2 = corner2->GetRadius(); bool bInverted = corner1->IsInverted(); @@ -449,8 +449,8 @@ void CXFA_Rectangle::GetPath(const std::vector& strokes, ASSERT(nIndex >= 0 && nIndex < 8); int32_t n = (nIndex & 1) ? nIndex - 1 : nIndex; - auto* corner1 = static_cast(strokes[n]); - auto* corner2 = static_cast(strokes[(n + 2) % 8]); + CXFA_Stroke* corner1 = strokes[n]; + CXFA_Stroke* corner2 = strokes[(n + 2) % 8]; float fRadius1 = bCorner ? corner1->GetRadius() : 0.0f; float fRadius2 = bCorner ? corner2->GetRadius() : 0.0f; bool bInverted = corner1->IsInverted(); -- cgit v1.2.3