summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_save.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_save.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_save.cpp')
-rw-r--r--fpdfsdk/fpdf_save.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/fpdfsdk/fpdf_save.cpp b/fpdfsdk/fpdf_save.cpp
index cd1889e005..7da48f375d 100644
--- a/fpdfsdk/fpdf_save.cpp
+++ b/fpdfsdk/fpdf_save.cpp
@@ -97,10 +97,10 @@ bool SaveXFADocumentData(CPDFXFA_Context* pContext,
if (pFormPDFObj->IsReference()) {
CPDF_Object* pFormDirectObj = pFormPDFObj->GetDirect();
if (pFormDirectObj && pFormDirectObj->IsStream()) {
- pFormStream = (CPDF_Stream*)pFormDirectObj;
+ pFormStream = pFormDirectObj->AsStream();
}
} else if (pFormPDFObj->IsStream()) {
- pFormStream = (CPDF_Stream*)pFormPDFObj;
+ pFormStream = pFormPDFObj->AsStream();
}
}
@@ -108,13 +108,13 @@ bool SaveXFADocumentData(CPDFXFA_Context* pContext,
// Get datasets CPDF_Stream
CPDF_Object* pDataSetsPDFObj = pArray->GetObjectAt(iDataSetsIndex);
if (pDataSetsPDFObj->IsReference()) {
- CPDF_Reference* pDataSetsRefObj = (CPDF_Reference*)pDataSetsPDFObj;
+ CPDF_Reference* pDataSetsRefObj = pDataSetsPDFObj->AsReference();
CPDF_Object* pDataSetsDirectObj = pDataSetsRefObj->GetDirect();
if (pDataSetsDirectObj && pDataSetsDirectObj->IsStream()) {
- pDataSetsStream = (CPDF_Stream*)pDataSetsDirectObj;
+ pDataSetsStream = pDataSetsDirectObj->AsStream();
}
} else if (pDataSetsPDFObj->IsStream()) {
- pDataSetsStream = (CPDF_Stream*)pDataSetsPDFObj;
+ pDataSetsStream = pDataSetsPDFObj->AsStream();
}
}
// L"datasets"