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

Unified Diff: xfa/src/fxbarcode/datamatrix/BC_DataMatrixDetector.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
Index: xfa/src/fxbarcode/datamatrix/BC_DataMatrixDetector.cpp
diff --git a/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDetector.cpp b/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDetector.cpp
index d1b36b994937f96226c0186b0e36b36a18a9b722..b89ef7066bc6128f8ca2131dd3cb62c1afd59ad2 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);
« no previous file with comments | « xfa/src/fxbarcode/datamatrix/BC_DataMatrixDecoder.cpp ('k') | xfa/src/fxbarcode/datamatrix/BC_DataMatrixReader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698