summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-08-26 14:56:39 -0700
committerCommit bot <commit-bot@chromium.org>2016-08-26 14:56:39 -0700
commit83d2351fd64128156c9abfb70266133d58a5e525 (patch)
treeb975e59ff6a31fbe86b289294fe65f9150e18fb6 /core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
parent0ee35908e906922a423fb18d7085ef80d0d8d8c8 (diff)
downloadpdfium-83d2351fd64128156c9abfb70266133d58a5e525.tar.xz
Remove CFX_CountRef::IsNull in favor of operator bool
Review-Url: https://codereview.chromium.org/2285513002
Diffstat (limited to 'core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp')
-rw-r--r--core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp b/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
index 2b7ac6fc2a..dbfd741887 100644
--- a/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
+++ b/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
@@ -706,7 +706,7 @@ void CPDF_ContentParser::Start(CPDF_Form* pForm,
pParentMatrix, pForm, pResources, &form_bbox, pGraphicStates, level));
m_pParser->GetCurStates()->m_CTM = form_matrix;
m_pParser->GetCurStates()->m_ParentMatrix = form_matrix;
- if (ClipPath.NotNull()) {
+ if (ClipPath) {
m_pParser->GetCurStates()->m_ClipPath.AppendPath(ClipPath, FXFILL_WINDING,
TRUE);
}
@@ -799,19 +799,15 @@ void CPDF_ContentParser::Continue(IFX_Pause* pPause) {
FXSYS_round(m_pParser->GetType3Data()[5] * 1000);
}
for (auto& pObj : *m_pObjectHolder->GetPageObjectList()) {
- if (pObj->m_ClipPath.IsNull()) {
+ if (!pObj->m_ClipPath)
continue;
- }
- if (pObj->m_ClipPath.GetPathCount() != 1) {
+ if (pObj->m_ClipPath.GetPathCount() != 1)
continue;
- }
- if (pObj->m_ClipPath.GetTextCount()) {
+ if (pObj->m_ClipPath.GetTextCount())
continue;
- }
CPDF_Path ClipPath = pObj->m_ClipPath.GetPath(0);
- if (!ClipPath.IsRect() || pObj->IsShading()) {
+ if (!ClipPath.IsRect() || pObj->IsShading())
continue;
- }
CFX_FloatRect old_rect(ClipPath.GetPointX(0), ClipPath.GetPointY(0),
ClipPath.GetPointX(2), ClipPath.GetPointY(2));
CFX_FloatRect obj_rect(pObj->m_Left, pObj->m_Bottom, pObj->m_Right,