summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/fpdf_save.cpp6
-rw-r--r--fpdfsdk/pwl/cpwl_icon.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/fpdfsdk/fpdf_save.cpp b/fpdfsdk/fpdf_save.cpp
index e4a1a607bb..6064a73629 100644
--- a/fpdfsdk/fpdf_save.cpp
+++ b/fpdfsdk/fpdf_save.cpp
@@ -59,7 +59,7 @@ bool SaveXFADocumentData(CPDFXFA_Context* pContext,
if (!pPDFDocument)
return false;
- const CPDF_Dictionary* pRoot = pPDFDocument->GetRoot();
+ CPDF_Dictionary* pRoot = pPDFDocument->GetRoot();
if (!pRoot)
return false;
@@ -80,7 +80,7 @@ bool SaveXFADocumentData(CPDFXFA_Context* pContext,
int iDataSetsIndex = -1;
int iLast = size - 2;
for (int i = 0; i < size - 1; i++) {
- CPDF_Object* pPDFObj = pArray->GetObjectAt(i);
+ const CPDF_Object* pPDFObj = pArray->GetObjectAt(i);
if (!pPDFObj->IsString())
continue;
if (pPDFObj->GetString() == "form")
@@ -90,7 +90,6 @@ bool SaveXFADocumentData(CPDFXFA_Context* pContext,
}
CPDF_Stream* pFormStream = nullptr;
- CPDF_Stream* pDataSetsStream = nullptr;
if (iFormIndex != -1) {
// Get form CPDF_Stream
CPDF_Object* pFormPDFObj = pArray->GetObjectAt(iFormIndex);
@@ -104,6 +103,7 @@ bool SaveXFADocumentData(CPDFXFA_Context* pContext,
}
}
+ CPDF_Stream* pDataSetsStream = nullptr;
if (iDataSetsIndex != -1) {
// Get datasets CPDF_Stream
CPDF_Object* pDataSetsPDFObj = pArray->GetObjectAt(iDataSetsIndex);
diff --git a/fpdfsdk/pwl/cpwl_icon.cpp b/fpdfsdk/pwl/cpwl_icon.cpp
index 52a4464639..567a5786e6 100644
--- a/fpdfsdk/pwl/cpwl_icon.cpp
+++ b/fpdfsdk/pwl/cpwl_icon.cpp
@@ -49,7 +49,7 @@ std::pair<float, float> CPWL_Icon::GetIconPosition() {
if (!m_pIconFit)
return {0.0f, 0.0f};
- CPDF_Array* pA =
+ const CPDF_Array* pA =
m_pIconFit->GetDict() ? m_pIconFit->GetDict()->GetArrayFor("A") : nullptr;
if (!pA)
return {0.0f, 0.0f};