diff options
author | Lei Zhang <thestig@chromium.org> | 2015-12-14 18:29:28 -0800 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-12-14 18:29:28 -0800 |
commit | e385244f8cd6ae376f6b3cf1265a0795d5d30eff (patch) | |
tree | 4bdd7c459f167ee56ae35f3b87222c2557f501f8 /core/src/fxge/win32/fx_win32_print.cpp | |
parent | e3c7c2b54348da4a6939f6672f6c6bff126815a7 (diff) | |
download | pdfium-e385244f8cd6ae376f6b3cf1265a0795d5d30eff.tar.xz |
Get rid of most instance of 'foo == NULL'
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1520063002 .
Diffstat (limited to 'core/src/fxge/win32/fx_win32_print.cpp')
-rw-r--r-- | core/src/fxge/win32/fx_win32_print.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/core/src/fxge/win32/fx_win32_print.cpp b/core/src/fxge/win32/fx_win32_print.cpp index 39828b14d8..0c00a7b3d9 100644 --- a/core/src/fxge/win32/fx_win32_print.cpp +++ b/core/src/fxge/win32/fx_win32_print.cpp @@ -56,7 +56,7 @@ FX_BOOL CGdiPrinterDriver::SetDIBits(const CFX_DIBSource* pSource, } CFX_DIBExtractor temp(pSource); CFX_DIBitmap* pBitmap = temp; - if (pBitmap == NULL) { + if (!pBitmap) { return FALSE; } return GDI_SetDIBits(pBitmap, pSrcRect, left, top, pIccTransform); @@ -82,7 +82,7 @@ FX_BOOL CGdiPrinterDriver::StretchDIBits(const CFX_DIBSource* pSource, if (dest_width < 0 || dest_height < 0) { CFX_DIBitmap* pFlipped = pSource->FlipImage(dest_width < 0, dest_height < 0); - if (pFlipped == NULL) { + if (!pFlipped) { return FALSE; } if (dest_width < 0) { @@ -99,7 +99,7 @@ FX_BOOL CGdiPrinterDriver::StretchDIBits(const CFX_DIBSource* pSource, } CFX_DIBExtractor temp(pSource); CFX_DIBitmap* pBitmap = temp; - if (pBitmap == NULL) { + if (!pBitmap) { return FALSE; } return GDI_StretchBitMask(pBitmap, dest_left, dest_top, dest_width, @@ -112,7 +112,7 @@ FX_BOOL CGdiPrinterDriver::StretchDIBits(const CFX_DIBSource* pSource, if (dest_width < 0 || dest_height < 0) { CFX_DIBitmap* pFlipped = pSource->FlipImage(dest_width < 0, dest_height < 0); - if (pFlipped == NULL) { + if (!pFlipped) { return FALSE; } if (dest_width < 0) { @@ -129,7 +129,7 @@ FX_BOOL CGdiPrinterDriver::StretchDIBits(const CFX_DIBSource* pSource, } CFX_DIBExtractor temp(pSource); CFX_DIBitmap* pBitmap = temp; - if (pBitmap == NULL) { + if (!pBitmap) { return FALSE; } return GDI_StretchDIBits(pBitmap, dest_left, dest_top, dest_width, @@ -142,7 +142,7 @@ static CFX_DIBitmap* Transform1bppBitmap(const CFX_DIBSource* pSrc, pSrc->GetFormat() == FXDIB_1bppCmyk); CFX_DIBExtractor src_bitmap(pSrc); CFX_DIBitmap* pSrcBitmap = src_bitmap; - if (pSrcBitmap == NULL) { + if (!pSrcBitmap) { return NULL; } int src_width = pSrcBitmap->GetWidth(), src_height = pSrcBitmap->GetHeight(); @@ -250,7 +250,7 @@ FX_BOOL CGdiPrinterDriver::StartDIBits(const CFX_DIBSource* pSource, if (FXSYS_fabs(pMatrix->a) < 0.5f && FXSYS_fabs(pMatrix->d) < 0.5f) { CFX_DIBitmap* pTransformed = pSource->SwapXY(pMatrix->c > 0, pMatrix->b < 0); - if (pTransformed == NULL) { + if (!pTransformed) { return FALSE; } FX_BOOL ret = StretchDIBits( @@ -261,7 +261,7 @@ FX_BOOL CGdiPrinterDriver::StartDIBits(const CFX_DIBSource* pSource, } if (pSource->GetBPP() == 1) { CFX_DIBitmap* pTransformed = Transform1bppBitmap(pSource, pMatrix); - if (pIccTransform == NULL) { + if (!pIccTransform) { return FALSE; } SaveState(); |