From ab36e73c8c5409fa262d4fa2faffe65c8804a792 Mon Sep 17 00:00:00 2001 From: tsepez Date: Tue, 11 Oct 2016 13:42:12 -0700 Subject: Add CPDF_Object::IsInline() Prevent having to remember what an object number of 0 implies. Review-Url: https://codereview.chromium.org/2412673002 --- core/fpdfapi/render/fpdf_render_loadimage.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/fpdfapi/render') diff --git a/core/fpdfapi/render/fpdf_render_loadimage.cpp b/core/fpdfapi/render/fpdf_render_loadimage.cpp index 940aa37479..a4f0e7befb 100644 --- a/core/fpdfapi/render/fpdf_render_loadimage.cpp +++ b/core/fpdfapi/render/fpdf_render_loadimage.cpp @@ -163,7 +163,7 @@ FX_BOOL CPDF_DIBSource::Load(CPDF_Document* pDoc, } m_GroupFamily = GroupFamily; m_bLoadMask = bLoadMask; - if (!LoadColorInfo(m_pStream->GetObjNum() != 0 ? nullptr : pFormResources, + if (!LoadColorInfo(m_pStream->IsInline() ? pFormResources : nullptr, pPageResources)) { return FALSE; } @@ -285,7 +285,7 @@ int CPDF_DIBSource::StartLoadDIBSource(CPDF_Document* pDoc, } m_GroupFamily = GroupFamily; m_bLoadMask = bLoadMask; - if (!LoadColorInfo(m_pStream->GetObjNum() != 0 ? nullptr : pFormResources, + if (!LoadColorInfo(m_pStream->IsInline() ? pFormResources : nullptr, pPageResources)) { return 0; } -- cgit v1.2.3