Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(247)

Unified Diff: core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp

Issue 1529553003: Merge to XFA: Get rid of most instance of 'foo != NULL' (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: 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 ccb184c6cf9b41dd326a6cbdb47f1ca0c936bc5f..640e8671f8cfbc4db6edbb82cc8478401a481f37 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);

Powered by Google App Engine
This is Rietveld 408576698