summaryrefslogtreecommitdiff
path: root/core/src/fxge/ge
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-12-14 18:10:25 -0800
committerLei Zhang <thestig@chromium.org>2015-12-14 18:10:25 -0800
commite3c7c2b54348da4a6939f6672f6c6bff126815a7 (patch)
tree68cc9bebdd5f4f055bfa7de116862091709b4054 /core/src/fxge/ge
parentba41a35553573ab718026e8508e1e32107db6595 (diff)
downloadpdfium-e3c7c2b54348da4a6939f6672f6c6bff126815a7.tar.xz
Get rid of most instance of 'foo != NULL'
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1512763013 .
Diffstat (limited to 'core/src/fxge/ge')
-rw-r--r--core/src/fxge/ge/fx_ge_device.cpp1
-rw-r--r--core/src/fxge/ge/fx_ge_ps.cpp4
-rw-r--r--core/src/fxge/ge/fx_ge_text.cpp2
3 files changed, 3 insertions, 4 deletions
diff --git a/core/src/fxge/ge/fx_ge_device.cpp b/core/src/fxge/ge/fx_ge_device.cpp
index 94efd864c0..37204268f2 100644
--- a/core/src/fxge/ge/fx_ge_device.cpp
+++ b/core/src/fxge/ge/fx_ge_device.cpp
@@ -19,7 +19,6 @@ void CFX_RenderDevice::SetDeviceDriver(IFX_RenderDeviceDriver* pDriver) {
InitDeviceInfo();
}
void CFX_RenderDevice::InitDeviceInfo() {
- ASSERT(m_pDeviceDriver != NULL);
m_Width = m_pDeviceDriver->GetDeviceCaps(FXDC_PIXEL_WIDTH);
m_Height = m_pDeviceDriver->GetDeviceCaps(FXDC_PIXEL_HEIGHT);
m_bpp = m_pDeviceDriver->GetDeviceCaps(FXDC_BITS_PIXEL);
diff --git a/core/src/fxge/ge/fx_ge_ps.cpp b/core/src/fxge/ge/fx_ge_ps.cpp
index 6ce8f4635b..ceb2acf2bc 100644
--- a/core/src/fxge/ge/fx_ge_ps.cpp
+++ b/core/src/fxge/ge/fx_ge_ps.cpp
@@ -417,7 +417,7 @@ FX_BOOL CFX_PSRenderer::DrawDIBits(const CFX_DIBSource* pSource,
pConverted = pSource->CloneConvert(FXDIB_Rgb);
break;
case FXDIB_8bppRgb:
- if (pSource->GetPalette() != NULL) {
+ if (pSource->GetPalette()) {
pConverted = pSource->CloneConvert(FXDIB_Rgb);
}
break;
@@ -425,7 +425,7 @@ FX_BOOL CFX_PSRenderer::DrawDIBits(const CFX_DIBSource* pSource,
pConverted = pSource->CloneConvert(FXDIB_Cmyk);
break;
case FXDIB_8bppCmyk:
- if (pSource->GetPalette() != NULL) {
+ if (pSource->GetPalette()) {
pConverted = pSource->CloneConvert(FXDIB_Cmyk);
}
break;
diff --git a/core/src/fxge/ge/fx_ge_text.cpp b/core/src/fxge/ge/fx_ge_text.cpp
index d330576433..cd6b690a12 100644
--- a/core/src/fxge/ge/fx_ge_text.cpp
+++ b/core/src/fxge/ge/fx_ge_text.cpp
@@ -229,7 +229,7 @@ FX_BOOL CFX_RenderDevice::DrawNormalText(int nChars,
if (FXSYS_fabs(char2device.a) + FXSYS_fabs(char2device.b) > 50 * 1.0f ||
((m_DeviceClass == FXDC_PRINTER && !m_pDeviceDriver->IsPSPrintDriver()) &&
!(text_flags & FXTEXT_PRINTIMAGETEXT))) {
- if (pFont->GetFace() != NULL ||
+ if (pFont->GetFace() ||
(pFont->GetSubstFont()->m_SubstFlags & FXFONT_SUBST_GLYPHPATH)) {
int nPathFlags =
(text_flags & FXTEXT_NOSMOOTH) == 0 ? 0 : FXFILL_NOPATHSMOOTH;