diff options
author | Lei Zhang <thestig@chromium.org> | 2015-12-14 18:27:25 -0800 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-12-14 18:27:25 -0800 |
commit | 96660d6f382204339d6b1aadc3913303d436e252 (patch) | |
tree | b5f84756e1a89251831cebc05b9d4e1f6cb2027b /core/src/fpdfapi/fpdf_edit | |
parent | d983b09c3ae29a97cba8e9ec9c6351545f6087ee (diff) | |
download | pdfium-96660d6f382204339d6b1aadc3913303d436e252.tar.xz |
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 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_edit')
-rw-r--r-- | core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp | 2 | ||||
-rw-r--r-- | core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp | 4 | ||||
-rw-r--r-- | core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp | 2 | ||||
-rw-r--r-- | core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp index 4df841fb75..eda51deb3b 100644 --- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp +++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp @@ -45,7 +45,7 @@ void CPDF_PageContentGenerate::GenerateContent() { } CPDF_Object* pContent = pPageDict ? pPageDict->GetElementValue("Contents") : NULL; - if (pContent != NULL) { + if (pContent) { pPageDict->RemoveAt("Contents"); } CPDF_Stream* pStream = new CPDF_Stream(NULL, 0, NULL); diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp index 52129d9e54..a797332727 100644 --- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp +++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp @@ -1433,8 +1433,8 @@ void CPDF_Creator::InitNewObjNumOffsets() { FX_BOOL bNewStart = FALSE; for (; i < iCount; i++) { FX_DWORD dwCurObjNum = m_NewObjNumArray.ElementAt(i); - FX_BOOL bExist = (dwCurObjNum < nOldSize && - m_ObjectOffset.GetPtrAt(dwCurObjNum) != NULL); + FX_BOOL bExist = + (dwCurObjNum < nOldSize && m_ObjectOffset.GetPtrAt(dwCurObjNum)); if (bExist || dwCurObjNum - dwLastObjNum > 1) { if (!bNewStart) { m_ObjectOffset.Add(dwStartObjNum, dwLastObjNum - dwStartObjNum + 1); diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp index 5467cfdaec..7febc7932f 100644 --- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp +++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp @@ -429,7 +429,7 @@ CPDF_Font* CPDF_Document::AddWindowsFont(LOGFONTA* pLogFont, #if (_FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_) uint32_t FX_GetLangHashCode(const FX_CHAR* pStr) { - FXSYS_assert(pStr != NULL); + FXSYS_assert(pStr); int32_t iLength = FXSYS_strlen(pStr); const FX_CHAR* pStrEnd = pStr + iLength; uint32_t uHashCode = 0; 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); |