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

Unified Diff: xfa/src/fxbarcode/oned/BC_OneDimWriter.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_OneDimWriter.cpp
diff --git a/xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp b/xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp
index b7ad14d592b3fcbed31ec34aceb926183826a151..415f08700f93471d0172b84304f655cc9bf81daf 100644
--- a/xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp
@@ -45,10 +45,7 @@ CBC_OneDimWriter::CBC_OneDimWriter() {
m_output = NULL;
}
CBC_OneDimWriter::~CBC_OneDimWriter() {
- if (m_output != NULL) {
- delete m_output;
- m_output = NULL;
- }
+ delete m_output;
}
void CBC_OneDimWriter::SetPrintChecksum(FX_BOOL checksum) {
m_bPrintChecksum = checksum;
@@ -198,7 +195,7 @@ void CBC_OneDimWriter::ShowDeviceChars(CFX_RenderDevice* device,
device->FillRect(&re, m_backgroundColor);
CFX_Matrix affine_matrix(1.0, 0.0, 0.0, -1.0, (FX_FLOAT)locX,
(FX_FLOAT)(locY + iFontSize));
- if (matrix != NULL) {
+ if (matrix) {
affine_matrix.Concat(*matrix);
}
device->DrawNormalText(str.GetLength(), pCharPos, m_pFont,
@@ -286,7 +283,7 @@ void CBC_OneDimWriter::ShowChars(const CFX_WideStringC& contents,
geWidth = (FX_FLOAT)barWidth;
break;
}
- if (device != NULL) {
+ if (device) {
ShowDeviceChars(device, matrix, str, geWidth, pCharPos, (FX_FLOAT)locX,
(FX_FLOAT)locY, barWidth);
} else {

Powered by Google App Engine
This is Rietveld 408576698