summaryrefslogtreecommitdiff
path: root/xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2016-02-24 15:26:50 -0800
committerLei Zhang <thestig@chromium.org>2016-02-24 15:26:50 -0800
commit38eaaf36b09b816b963015e33dc4eb02580e0462 (patch)
tree9a2721eb404a2de4ddce91b50cac25b2cac0edb1 /xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp
parente1fb98394a6885cf03bdc6391e5a3878aad5b375 (diff)
downloadpdfium-38eaaf36b09b816b963015e33dc4eb02580e0462.tar.xz
Remove foo != NULL checks in xfa/src/fxbarcode.
R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1726373002 .
Diffstat (limited to 'xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp')
-rw-r--r--xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp b/xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp
index ed93e9852b..121b72cb05 100644
--- a/xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OneDimWriter.cpp
@@ -43,10 +43,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;
@@ -196,7 +193,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,
@@ -284,7 +281,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 {