summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_stream.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/parser/cpdf_stream.cpp')
-rw-r--r--core/fpdfapi/parser/cpdf_stream.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/core/fpdfapi/parser/cpdf_stream.cpp b/core/fpdfapi/parser/cpdf_stream.cpp
index 45d2ebb30d..fdbe308878 100644
--- a/core/fpdfapi/parser/cpdf_stream.cpp
+++ b/core/fpdfapi/parser/cpdf_stream.cpp
@@ -37,7 +37,11 @@ CPDF_Object::Type CPDF_Stream::GetType() const {
return STREAM;
}
-CPDF_Dictionary* CPDF_Stream::GetDict() const {
+CPDF_Dictionary* CPDF_Stream::GetDict() {
+ return m_pDict.get();
+}
+
+const CPDF_Dictionary* CPDF_Stream::GetDict() const {
return m_pDict.get();
}
@@ -84,11 +88,12 @@ std::unique_ptr<CPDF_Object> CPDF_Stream::CloneNonCyclic(
pAcc->LoadAllDataRaw();
uint32_t streamSize = pAcc->GetSize();
- CPDF_Dictionary* pDict = GetDict();
+ const CPDF_Dictionary* pDict = GetDict();
std::unique_ptr<CPDF_Dictionary> pNewDict;
if (pDict && !pdfium::ContainsKey(*pVisited, pDict)) {
- pNewDict = ToDictionary(
- static_cast<CPDF_Object*>(pDict)->CloneNonCyclic(bDirect, pVisited));
+ pNewDict =
+ ToDictionary(static_cast<const CPDF_Object*>(pDict)->CloneNonCyclic(
+ bDirect, pVisited));
}
return pdfium::MakeUnique<CPDF_Stream>(pAcc->DetachData(), streamSize,
std::move(pNewDict));