summaryrefslogtreecommitdiff
path: root/core/fpdftext/cpdf_textpage.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-05-10 14:00:53 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-10 21:08:04 +0000
commit0a0892626d24ce82e7026c32c71b1de036d4bbe1 (patch)
tree470bca7e1c5b27c967d246706d21018fd4d2d1f2 /core/fpdftext/cpdf_textpage.cpp
parent6f62ccd50ff85ba6a60ddf47993745739854cd8f (diff)
downloadpdfium-0a0892626d24ce82e7026c32c71b1de036d4bbe1.tar.xz
Replace operator bool with HasRef() in classes with a CFX_SharedCopyOnWrite member.
Change-Id: I51e30d298e87b9ae0d5aca83b2f1d6787efce70a Reviewed-on: https://pdfium-review.googlesource.com/5290 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'core/fpdftext/cpdf_textpage.cpp')
-rw-r--r--core/fpdftext/cpdf_textpage.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/fpdftext/cpdf_textpage.cpp b/core/fpdftext/cpdf_textpage.cpp
index c64b8e17ae..5a39281183 100644
--- a/core/fpdftext/cpdf_textpage.cpp
+++ b/core/fpdftext/cpdf_textpage.cpp
@@ -800,7 +800,7 @@ void CPDF_TextPage::ProcessTextObject(
FPDFText_MarkedContent CPDF_TextPage::PreMarkedContent(PDFTEXT_Obj Obj) {
CPDF_TextObject* pTextObj = Obj.m_pTextObj;
- if (!pTextObj->m_ContentMark)
+ if (!pTextObj->m_ContentMark.HasRef())
return FPDFText_MarkedContent::Pass;
int nContentMark = pTextObj->m_ContentMark.CountItems();
@@ -825,7 +825,7 @@ FPDFText_MarkedContent CPDF_TextPage::PreMarkedContent(PDFTEXT_Obj Obj) {
if (!bExist)
return FPDFText_MarkedContent::Pass;
- if (m_pPreTextObj && m_pPreTextObj->m_ContentMark &&
+ if (m_pPreTextObj && m_pPreTextObj->m_ContentMark.HasRef() &&
m_pPreTextObj->m_ContentMark.CountItems() == n &&
pDict == m_pPreTextObj->m_ContentMark.GetItem(n - 1).GetParam()) {
return FPDFText_MarkedContent::Done;
@@ -863,7 +863,7 @@ FPDFText_MarkedContent CPDF_TextPage::PreMarkedContent(PDFTEXT_Obj Obj) {
void CPDF_TextPage::ProcessMarkedContent(PDFTEXT_Obj Obj) {
CPDF_TextObject* pTextObj = Obj.m_pTextObj;
- if (!pTextObj->m_ContentMark)
+ if (!pTextObj->m_ContentMark.HasRef())
return;
int nContentMark = pTextObj->m_ContentMark.CountItems();