diff options
author | Lei Zhang <thestig@chromium.org> | 2016-02-24 15:26:50 -0800 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2016-02-24 15:26:50 -0800 |
commit | 38eaaf36b09b816b963015e33dc4eb02580e0462 (patch) | |
tree | 9a2721eb404a2de4ddce91b50cac25b2cac0edb1 /xfa/src/fxbarcode/datamatrix/BC_DataMatrixDetector.cpp | |
parent | e1fb98394a6885cf03bdc6391e5a3878aad5b375 (diff) | |
download | pdfium-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/datamatrix/BC_DataMatrixDetector.cpp')
-rw-r--r-- | xfa/src/fxbarcode/datamatrix/BC_DataMatrixDetector.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDetector.cpp b/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDetector.cpp index d1b36b9949..b89ef7066b 100644 --- a/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDetector.cpp +++ b/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDetector.cpp @@ -40,10 +40,7 @@ void CBC_DataMatrixDetector::Init(int32_t& e) { BC_EXCEPTION_CHECK_ReturnVoid(e); } CBC_DataMatrixDetector::~CBC_DataMatrixDetector() { - if (m_rectangleDetector != NULL) { - delete m_rectangleDetector; - } - m_rectangleDetector = NULL; + delete m_rectangleDetector; } inline FX_BOOL ResultPointsAndTransitionsComparator(void* a, void* b) { return ((CBC_ResultPointsAndTransitions*)b)->GetTransitions() > @@ -82,7 +79,7 @@ CBC_QRDetectorResult* CBC_DataMatrixDetector::Detect(int32_t& e) { CBC_ResultPoint* bottomLeft = NULL; CBC_ResultPoint* maybeBottomRight = NULL; FX_POSITION itBegin = pointCount.GetStartPosition(); - while (itBegin != NULL) { + while (itBegin) { CBC_ResultPoint* key = 0; int32_t value = 0; pointCount.GetNextAssoc(itBegin, key, value); |