diff options
author | Lei Zhang <thestig@chromium.org> | 2015-12-14 18:29:28 -0800 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-12-14 18:29:28 -0800 |
commit | e385244f8cd6ae376f6b3cf1265a0795d5d30eff (patch) | |
tree | 4bdd7c459f167ee56ae35f3b87222c2557f501f8 /core/src/fpdfapi/fpdf_render/fpdf_render.cpp | |
parent | e3c7c2b54348da4a6939f6672f6c6bff126815a7 (diff) | |
download | pdfium-e385244f8cd6ae376f6b3cf1265a0795d5d30eff.tar.xz |
Get rid of most instance of 'foo == NULL'
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1520063002 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_render/fpdf_render.cpp')
-rw-r--r-- | core/src/fpdfapi/fpdf_render/fpdf_render.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render.cpp index 801f9e737c..bee188e049 100644 --- a/core/src/fpdfapi/fpdf_render/fpdf_render.cpp +++ b/core/src/fpdfapi/fpdf_render/fpdf_render.cpp @@ -258,7 +258,7 @@ void CPDF_RenderStatus::RenderObjectList(const CPDF_PageObjects* pObjs, if (!pCurObj) { continue; } - if (pCurObj == NULL || pCurObj->m_Left > clip_rect.right || + if (!pCurObj || pCurObj->m_Left > clip_rect.right || pCurObj->m_Right < clip_rect.left || pCurObj->m_Bottom > clip_rect.top || pCurObj->m_Top < clip_rect.bottom) { @@ -358,7 +358,7 @@ FX_BOOL CPDF_RenderStatus::GetObjectClippedRect(const CPDF_PageObject* pObj, void CPDF_RenderStatus::DitherObjectArea(const CPDF_PageObject* pObj, const CFX_Matrix* pObj2Device) { CFX_DIBitmap* pBitmap = m_pDevice->GetBitmap(); - if (pBitmap == NULL) { + if (!pBitmap) { return; } FX_RECT rect; @@ -684,7 +684,7 @@ void CPDF_RenderStatus::DrawClipPath(CPDF_ClipPath ClipPath, int i; for (i = 0; i < nClipPath; i++) { const CFX_PathData* pPathData = ClipPath.GetPath(i); - if (pPathData == NULL) { + if (!pPathData) { continue; } CFX_GraphStateData stroke_state; @@ -780,8 +780,8 @@ FX_BOOL CPDF_RenderStatus::ProcessTransparency(const CPDF_PageObject* pPageObj, pDocument->GetPageData()->ReleaseColorSpace(pCSObj); } } - if (pSMaskDict == NULL && group_alpha == 1.0f && - blend_type == FXDIB_BLEND_NORMAL && !bTextClip && !bGroupTransparent) { + if (!pSMaskDict && group_alpha == 1.0f && blend_type == FXDIB_BLEND_NORMAL && + !bTextClip && !bGroupTransparent) { return FALSE; } FX_BOOL isolated = Transparency & PDFTRANS_ISOLATED; @@ -838,7 +838,7 @@ FX_BOOL CPDF_RenderStatus::ProcessTransparency(const CPDF_PageObject* pPageObj, text_device.Attach(pTextMask.get()); for (FX_DWORD i = 0; i < pPageObj->m_ClipPath.GetTextCount(); i++) { CPDF_TextObject* textobj = pPageObj->m_ClipPath.GetText(i); - if (textobj == NULL) { + if (!textobj) { break; } CFX_Matrix text_matrix; @@ -1079,7 +1079,7 @@ void CPDF_ProgressiveRenderer::Continue(IFX_Pause* pPause) { for (; m_LayerIndex < nLayers; m_LayerIndex++) { _PDF_RenderItem* pItem = m_pContext->m_ContentList.GetDataPtr(m_LayerIndex); FX_POSITION LastPos = pItem->m_pObjectList->GetLastObjectPosition(); - if (m_ObjectPos == NULL) { + if (!m_ObjectPos) { if (LastPos == m_PrevLastPos) { if (!pItem->m_pObjectList->IsParsed()) { pItem->m_pObjectList->ContinueParse(pPause); |