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

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: rebase 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
« no previous file with comments | « xfa/src/fxbarcode/oned/BC_OnedEAN8Reader.cpp ('k') | xfa/src/fxbarcode/oned/BC_OnedUPCAReader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f552531e6369aafcde29ffe67fcea48974ff0c23..61fe75aae3532c91e4f668f7ad8ac7491fcbe977 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,
« no previous file with comments | « xfa/src/fxbarcode/oned/BC_OnedEAN8Reader.cpp ('k') | xfa/src/fxbarcode/oned/BC_OnedUPCAReader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698