summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp6
-rw-r--r--core/fpdfapi/edit/cpdf_pagecontentmanager.cpp2
-rw-r--r--core/fpdfapi/page/cpdf_pageobjectholder.h2
3 files changed, 5 insertions, 5 deletions
diff --git a/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp b/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp
index da6c74e2c7..ba31516f4a 100644
--- a/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp
+++ b/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp
@@ -85,10 +85,10 @@ CPDF_PageContentGenerator::GenerateModifiedStreams() {
if (pPageObj->IsDirty())
all_dirty_streams.insert(pPageObj->GetContentStream());
}
- const std::set<int32_t>* marked_dirty_streams =
+ const std::set<int32_t>& marked_dirty_streams =
m_pObjHolder->GetDirtyStreams();
- all_dirty_streams.insert(marked_dirty_streams->begin(),
- marked_dirty_streams->end());
+ all_dirty_streams.insert(marked_dirty_streams.begin(),
+ marked_dirty_streams.end());
// Start regenerating dirty streams.
std::map<int32_t, std::unique_ptr<std::ostringstream>> streams;
diff --git a/core/fpdfapi/edit/cpdf_pagecontentmanager.cpp b/core/fpdfapi/edit/cpdf_pagecontentmanager.cpp
index 46033bc0d1..3ba23a88fb 100644
--- a/core/fpdfapi/edit/cpdf_pagecontentmanager.cpp
+++ b/core/fpdfapi/edit/cpdf_pagecontentmanager.cpp
@@ -101,7 +101,7 @@ void CPDF_PageContentManager::ExecuteScheduledRemovals() {
// updated.
// Since this is only called by CPDF_PageContentGenerator::GenerateContent(),
// which cleans up the dirty streams first, this should always be true.
- ASSERT(obj_holder_->GetDirtyStreams()->empty());
+ ASSERT(obj_holder_->GetDirtyStreams().empty());
if (contents_stream_) {
// Only stream that can be removed is 0.
diff --git a/core/fpdfapi/page/cpdf_pageobjectholder.h b/core/fpdfapi/page/cpdf_pageobjectholder.h
index d18f400568..b1f7fb9e7f 100644
--- a/core/fpdfapi/page/cpdf_pageobjectholder.h
+++ b/core/fpdfapi/page/cpdf_pageobjectholder.h
@@ -85,7 +85,7 @@ class CPDF_PageObjectHolder {
void AddImageMaskBoundingBox(const CFX_FloatRect& box);
void Transform(const CFX_Matrix& matrix);
CFX_FloatRect CalcBoundingBox() const;
- const std::set<int32_t>* GetDirtyStreams() const { return &m_DirtyStreams; }
+ const std::set<int32_t>& GetDirtyStreams() const { return m_DirtyStreams; }
void ClearDirtyStreams() { m_DirtyStreams.clear(); }
UnownedPtr<CPDF_Dictionary> m_pPageResources;