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

Unified Diff: core/src/fpdfapi/fpdf_render/fpdf_render_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
Index: core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp
index 1d1c392af5f49eb8dd7268529e415cd51488594d..938a495eb10636798f862b7f64532b33d2539d63 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp
@@ -344,7 +344,7 @@ FX_BOOL CPDF_ImageRenderer::StartLoadDIBSource() {
m_LoadHandle, m_bStdCS, m_pRenderStatus->m_GroupFamily,
m_pRenderStatus->m_bLoadMask, m_pRenderStatus, dest_width,
dest_height)) {
- if (m_LoadHandle != NULL) {
+ if (m_LoadHandle) {
m_Status = 4;
return TRUE;
}
@@ -389,7 +389,7 @@ FX_BOOL CPDF_ImageRenderer::StartRenderDIBSource() {
CPDF_Color* pColor = m_pImageObject->m_ColorState.GetFillColor();
if (pColor && pColor->IsPattern()) {
m_pPattern = pColor->GetPattern();
- if (m_pPattern != NULL) {
+ if (m_pPattern) {
m_bPatternColor = TRUE;
}
}
@@ -711,7 +711,7 @@ FX_BOOL CPDF_ImageRenderer::StartDIBSource() {
if (m_pRenderStatus->m_pDevice->StartDIBits(
m_pDIBSource, m_BitmapAlpha, m_FillArgb, &m_ImageMatrix, m_Flags,
m_DeviceHandle, 0, NULL, m_BlendType)) {
- if (m_DeviceHandle != NULL) {
+ if (m_DeviceHandle) {
m_Status = 3;
return TRUE;
}
« no previous file with comments | « core/src/fpdfapi/fpdf_render/fpdf_render.cpp ('k') | core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698