Replaced static casts with CPDFPageObjectFromFPDFPageObject()
Change-Id: I6296928a1dbd5a8dffaf949ac4c8d7e8336c4448
Reviewed-on: https://pdfium-review.googlesource.com/7170
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/fpdfsdk/fpdfeditpath.cpp b/fpdfsdk/fpdfeditpath.cpp
index 6235210..12d8a97 100644
--- a/fpdfsdk/fpdfeditpath.cpp
+++ b/fpdfsdk/fpdfeditpath.cpp
@@ -194,7 +194,7 @@
static_cast<int>(CFX_GraphStateData::LineJoin::LineJoinBevel)) {
return;
}
- auto* pPathObj = static_cast<CPDF_PageObject*>(path);
+ auto* pPathObj = CPDFPageObjectFromFPDFPageObject(path);
CFX_GraphStateData::LineJoin lineJoin =
static_cast<CFX_GraphStateData::LineJoin>(line_join);
pPathObj->m_GraphState.SetLineJoin(lineJoin);
@@ -208,7 +208,7 @@
line_cap > static_cast<int>(CFX_GraphStateData::LineCap::LineCapSquare)) {
return;
}
- auto* pPathObj = static_cast<CPDF_PageObject*>(path);
+ auto* pPathObj = CPDFPageObjectFromFPDFPageObject(path);
CFX_GraphStateData::LineCap lineCap =
static_cast<CFX_GraphStateData::LineCap>(line_cap);
pPathObj->m_GraphState.SetLineCap(lineCap);