summaryrefslogtreecommitdiff
path: root/core/fpdfdoc
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-09-01 07:11:15 -0700
committerCommit bot <commit-bot@chromium.org>2016-09-01 07:11:15 -0700
commit22b64c361bf4630cdfe2b783d5b1e582f4842711 (patch)
treef2791406df5b4cc0225ab44508d9eb6dfef585ff /core/fpdfdoc
parent380f53ec1d0a46648473e407934c9adede6cc1bd (diff)
downloadpdfium-22b64c361bf4630cdfe2b783d5b1e582f4842711.tar.xz
Make CPDF_ContentMark have a CPDF_ContentMarkData.
This one doesn't require an explict Emplace(), as the object seems to get constructed only as a side-effect of making a private copy. Review-Url: https://codereview.chromium.org/2298953002
Diffstat (limited to 'core/fpdfdoc')
-rw-r--r--core/fpdfdoc/cpdf_occontext.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/fpdfdoc/cpdf_occontext.cpp b/core/fpdfdoc/cpdf_occontext.cpp
index 9206b97e6f..b4ddb6ab4f 100644
--- a/core/fpdfdoc/cpdf_occontext.cpp
+++ b/core/fpdfdoc/cpdf_occontext.cpp
@@ -182,9 +182,8 @@ bool CPDF_OCContext::GetOCGVisible(const CPDF_Dictionary* pOCGDict) {
}
bool CPDF_OCContext::CheckObjectVisible(const CPDF_PageObject* pObj) {
- const CPDF_ContentMarkData* pData = pObj->m_ContentMark.GetObject();
- for (int i = 0; i < pData->CountItems(); i++) {
- const CPDF_ContentMarkItem& item = pData->GetItem(i);
+ for (int i = 0; i < pObj->m_ContentMark.CountItems(); i++) {
+ const CPDF_ContentMarkItem& item = pObj->m_ContentMark.GetItem(i);
if (item.GetName() == "OC" &&
item.GetParamType() == CPDF_ContentMarkItem::PropertiesDict &&
!CheckOCGVisible(item.GetParam())) {