summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-07-31 16:41:47 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-07-31 16:41:47 +0000
commitcede561c5ae665a563409ba3bfc93c3cd6da5248 (patch)
tree0fef283760d8bb3e6562167f2d4019ca82c38f41 /xfa
parentb53ef1e52d40f586c401a7e3948259f8ebbfd3cc (diff)
downloadpdfium-cede561c5ae665a563409ba3bfc93c3cd6da5248.tar.xz
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 <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa')
-rw-r--r--xfa/fxfa/parser/cxfa_rectangle.cpp8
1 files 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<CXFA_Stroke*>& strokes,
float nx = 1.0f;
float ny = 1.0f;
CFX_PointF cp1, cp2;
- auto* corner1 = static_cast<CXFA_Corner*>(strokes[i]);
- auto* corner2 = static_cast<CXFA_Corner*>(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<CXFA_Stroke*>& strokes,
ASSERT(nIndex >= 0 && nIndex < 8);
int32_t n = (nIndex & 1) ? nIndex - 1 : nIndex;
- auto* corner1 = static_cast<CXFA_Corner*>(strokes[n]);
- auto* corner2 = static_cast<CXFA_Corner*>(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();