summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_transformpage.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-04-26 18:33:58 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-26 18:33:58 +0000
commitea3a2529a7aa0199b385b7caa2e465c124eac8aa (patch)
treecf8beb27054209ef2b71222c3cdc81bd39192651 /fpdfsdk/fpdf_transformpage.cpp
parentf9666864254bf84ef878630bbdaaaabbecab8ba5 (diff)
downloadpdfium-ea3a2529a7aa0199b385b7caa2e465c124eac8aa.tar.xz
Replace some c-style cast with static_cast<>
Change-Id: I9dd6a36770f77f3df6c4395572785d37402eadc2 Reviewed-on: https://pdfium-review.googlesource.com/31350 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdf_transformpage.cpp')
-rw-r--r--fpdfsdk/fpdf_transformpage.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/fpdfsdk/fpdf_transformpage.cpp b/fpdfsdk/fpdf_transformpage.cpp
index 860ba42c96..d2d9f8dbc4 100644
--- a/fpdfsdk/fpdf_transformpage.cpp
+++ b/fpdfsdk/fpdf_transformpage.cpp
@@ -189,9 +189,10 @@ FPDFPageObj_TransformClipPath(FPDF_PAGEOBJECT page_object,
double d,
double e,
double f) {
- CPDF_PageObject* pPageObj = (CPDF_PageObject*)page_object;
+ CPDF_PageObject* pPageObj = CPDFPageObjectFromFPDFPageObject(page_object);
if (!pPageObj)
return;
+
CFX_Matrix matrix((float)a, (float)b, (float)c, (float)d, (float)e, (float)f);
// Special treatment to shading object, because the ClipPath for shading
@@ -267,7 +268,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDFPage_InsertClipPath(FPDF_PAGE page,
return;
std::ostringstream strClip;
- CPDF_ClipPath* pClipPath = (CPDF_ClipPath*)clipPath;
+ auto* pClipPath = static_cast<CPDF_ClipPath*>(clipPath);
for (size_t i = 0; i < pClipPath->GetPathCount(); ++i) {
CPDF_Path path = pClipPath->GetPath(i);
if (path.GetPoints().empty()) {