summaryrefslogtreecommitdiff
path: root/core/fpdfapi/render
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2018-04-16 21:48:37 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-16 21:48:37 +0000
commit6b26e1ae69321717c5ce098a1cd2c9f3e1099344 (patch)
tree0ede098fdef5fe788457ce2e9f793f745f634072 /core/fpdfapi/render
parent8b0cf76f00c6e89e8bb7bf4bcf2189b27baac31c (diff)
downloadpdfium-6b26e1ae69321717c5ce098a1cd2c9f3e1099344.tar.xz
Remove non-const CPDF_PageObjectHolder::GetPageObjectList().
This makes it easier to control modifications to the page object list. Bug: pdfium:1051 Change-Id: Ia85c597fa6d39e89041b990b4b6c91e327ef811d Reviewed-on: https://pdfium-review.googlesource.com/30803 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/render')
-rw-r--r--core/fpdfapi/render/cpdf_progressiverenderer.cpp4
-rw-r--r--core/fpdfapi/render/cpdf_progressiverenderer.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/core/fpdfapi/render/cpdf_progressiverenderer.cpp b/core/fpdfapi/render/cpdf_progressiverenderer.cpp
index 922e3fd60d..b2d16300d4 100644
--- a/core/fpdfapi/render/cpdf_progressiverenderer.cpp
+++ b/core/fpdfapi/render/cpdf_progressiverenderer.cpp
@@ -63,8 +63,8 @@ void CPDF_ProgressiveRenderer::Continue(PauseIndicatorIface* pPause) {
m_ClipRect = m_pCurrentLayer->m_Matrix.GetInverse().TransformRect(
CFX_FloatRect(m_pDevice->GetClipBox()));
}
- CPDF_PageObjectList::iterator iter;
- CPDF_PageObjectList::iterator iterEnd =
+ CPDF_PageObjectList::const_iterator iter;
+ CPDF_PageObjectList::const_iterator iterEnd =
m_pCurrentLayer->m_pObjectHolder->GetPageObjectList()->end();
if (m_LastObjectRendered != iterEnd) {
iter = m_LastObjectRendered;
diff --git a/core/fpdfapi/render/cpdf_progressiverenderer.h b/core/fpdfapi/render/cpdf_progressiverenderer.h
index 5703b42918..400909bda5 100644
--- a/core/fpdfapi/render/cpdf_progressiverenderer.h
+++ b/core/fpdfapi/render/cpdf_progressiverenderer.h
@@ -54,7 +54,7 @@ class CPDF_ProgressiveRenderer {
CFX_FloatRect m_ClipRect;
uint32_t m_LayerIndex;
CPDF_RenderContext::Layer* m_pCurrentLayer;
- CPDF_PageObjectList::iterator m_LastObjectRendered;
+ CPDF_PageObjectList::const_iterator m_LastObjectRendered;
};
#endif // CORE_FPDFAPI_RENDER_CPDF_PROGRESSIVERENDERER_H_