From 76020fc9751e55661d1c01b6cd92dfcb1fd56e6a Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 18 May 2017 15:51:20 -0700 Subject: Move CCodec_ModuleMgr ownership to CPDF_ModuleMgr. More straight forward than CFX_GEModule owning in and CPDF_ModuleMgr holding a pointer to it. Remove assumptions that the codec modules may return nullptr, and do IWYU. Change-Id: Iba7fc3c7ec223fd6d29a1ab74ed13d35689bc5d5 Reviewed-on: https://pdfium-review.googlesource.com/5654 Commit-Queue: dsinclair Reviewed-by: dsinclair --- core/fpdfapi/page/fpdf_page_colors.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'core/fpdfapi/page/fpdf_page_colors.cpp') diff --git a/core/fpdfapi/page/fpdf_page_colors.cpp b/core/fpdfapi/page/fpdf_page_colors.cpp index e30c780439..3ba833f1ef 100644 --- a/core/fpdfapi/page/fpdf_page_colors.cpp +++ b/core/fpdfapi/page/fpdf_page_colors.cpp @@ -226,13 +226,11 @@ CPDF_IccProfile::CPDF_IccProfile(CPDF_Stream* pStream, m_nSrcComponents = 3; return; } + uint32_t nSrcComps = 0; auto* pIccModule = CPDF_ModuleMgr::Get()->GetIccModule(); - if (pIccModule) { - uint32_t nSrcComps = 0; - m_pTransform = pIccModule->CreateTransform_sRGB(pData, dwSize, nSrcComps); - if (m_pTransform) - m_nSrcComponents = nSrcComps; - } + m_pTransform = pIccModule->CreateTransform_sRGB(pData, dwSize, nSrcComps); + if (m_pTransform) + m_nSrcComponents = nSrcComps; } CPDF_IccProfile::~CPDF_IccProfile() { -- cgit v1.2.3