From 38eaaf36b09b816b963015e33dc4eb02580e0462 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Wed, 24 Feb 2016 15:26:50 -0800 Subject: Remove foo != NULL checks in xfa/src/fxbarcode. R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1726373002 . --- xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.cpp') diff --git a/xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.cpp b/xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.cpp index f552531e63..61fe75aae3 100644 --- a/xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.cpp +++ b/xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.cpp @@ -179,7 +179,7 @@ void CBC_OnedEAN8Writer::ShowChars(const CFX_WideStringC& contents, int32_t strWidth = 7 * multiple * 4; FX_FLOAT blank = 0.0; CFX_FxgeDevice geBitmap; - if (pOutBitmap != NULL) { + if (pOutBitmap) { geBitmap.Attach(pOutBitmap); } FX_FLOAT charsWidth = 0; @@ -212,7 +212,7 @@ void CBC_OnedEAN8Writer::ShowChars(const CFX_WideStringC& contents, blank); CFX_Matrix affine_matrix(1.0, 0.0, 0.0, -1.0, 0.0, (FX_FLOAT)iFontSize); CFX_FxgeDevice ge; - if (pOutBitmap != NULL) { + if (pOutBitmap) { delete ge.GetBitmap(); ge.Create(strWidth, iTextHeight, FXDIB_Argb); ge.GetBitmap()->Clear(m_backgroundColor); @@ -236,7 +236,7 @@ void CBC_OnedEAN8Writer::ShowChars(const CFX_WideStringC& contents, charsWidth = 0.0f; CalcTextInfo(tempStr, pCharPos + 4, m_pFont, (FX_FLOAT)strWidth, iFontSize, blank); - if (pOutBitmap != NULL) { + if (pOutBitmap) { delete ge.GetBitmap(); ge.Create(strWidth, iTextHeight, FXDIB_Argb); ge.GetBitmap()->Clear(m_backgroundColor); @@ -251,7 +251,7 @@ void CBC_OnedEAN8Writer::ShowChars(const CFX_WideStringC& contents, 1.0, 0.0, 0.0, -1.0, (FX_FLOAT)(leftPosition + 33 * multiple) * m_outputHScale, (FX_FLOAT)(m_Height - iTextHeight + iFontSize)); - if (matrix != NULL) { + if (matrix) { affine_matrix1.Concat(*matrix); } device->DrawNormalText(iLen, pCharPos + 4, m_pFont, -- cgit v1.2.3