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

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

Issue 1512763013: Get rid of most instance of 'foo != NULL' (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: nits 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
« no previous file with comments | « core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp ('k') | core/src/fpdfapi/fpdf_font/fpdf_font.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp ('k') | core/src/fpdfapi/fpdf_font/fpdf_font.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698