From 96660d6f382204339d6b1aadc3913303d436e252 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Mon, 14 Dec 2015 18:27:25 -0800 Subject: Merge to XFA: Get rid of most instance of 'foo != NULL' TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1512763013 . (cherry picked from commit e3c7c2b54348da4a6939f6672f6c6bff126815a7) Review URL: https://codereview.chromium.org/1529553003 . --- core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp') diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp index ccb184c6cf..640e8671f8 100644 --- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp +++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp @@ -259,7 +259,7 @@ void CPDF_Image::SetImage(const CFX_DIBitmap* pBitmap, delete pMaskBitmap; } } - FX_BOOL bStream = pFileWrite != NULL && pFileRead != NULL; + FX_BOOL bStream = pFileWrite && pFileRead; if (opType == 0) { if (iCompress & PDF_IMAGE_LOSSLESS_COMPRESS) { if (pBitmap->GetBPP() == 1) { @@ -270,7 +270,7 @@ void CPDF_Image::SetImage(const CFX_DIBitmap* pBitmap, if (pBitmap->GetBPP() == 1) { _JBIG2EncodeBitmap(pDict, pBitmap, m_pDocument, dest_buf, dest_size, FALSE); - } else if (pBitmap->GetBPP() >= 8 && pBitmap->GetPalette() != NULL) { + } else if (pBitmap->GetBPP() >= 8 && pBitmap->GetPalette()) { CFX_DIBitmap* pNewBitmap = new CFX_DIBitmap(); pNewBitmap->Copy(pBitmap); pNewBitmap->ConvertFormat(FXDIB_Rgb); -- cgit v1.2.3