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

Unified Diff: xfa/src/fxbarcode/oned/BC_OnedEAN8Writer.cpp

Issue 1726373002: Remove foo != NULL checks in xfa/src/fxbarcode. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Created 4 years, 10 months 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: 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 ae557866ec8dbe728aa8313bfb7826cce69f630e..9692ecf3a139243290fa7dafe038eeec72a831bb 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,

Powered by Google App Engine
This is Rietveld 408576698