From 6dc1d7753691c0ff2f390e8ffd95a3182064487e Mon Sep 17 00:00:00 2001 From: thestig Date: Thu, 9 Jun 2016 18:39:33 -0700 Subject: Get rid of NULLs in xfa/fxbarcode/ Review-Url: https://codereview.chromium.org/2048983002 --- xfa/fxbarcode/pdf417/BC_PDF417.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'xfa/fxbarcode/pdf417/BC_PDF417.cpp') diff --git a/xfa/fxbarcode/pdf417/BC_PDF417.cpp b/xfa/fxbarcode/pdf417/BC_PDF417.cpp index 908901c04e..317a1cb92b 100644 --- a/xfa/fxbarcode/pdf417/BC_PDF417.cpp +++ b/xfa/fxbarcode/pdf417/BC_PDF417.cpp @@ -390,7 +390,7 @@ CBC_PDF417::CBC_PDF417() { m_maxCols = 30; m_maxRows = 90; m_minRows = 3; - m_barcodeMatrix = NULL; + m_barcodeMatrix = nullptr; } CBC_PDF417::CBC_PDF417(FX_BOOL compact) { m_compact = compact; @@ -399,7 +399,7 @@ CBC_PDF417::CBC_PDF417(FX_BOOL compact) { m_maxCols = 30; m_maxRows = 90; m_minRows = 3; - m_barcodeMatrix = NULL; + m_barcodeMatrix = nullptr; } CBC_PDF417::~CBC_PDF417() { @@ -539,7 +539,7 @@ CFX_Int32Array* CBC_PDF417::determineDimensions( int32_t errorCorrectionCodeWords, int32_t& e) { FX_FLOAT ratio = 0.0f; - CFX_Int32Array* dimension = NULL; + CFX_Int32Array* dimension = nullptr; for (int32_t cols = m_minCols; cols <= m_maxCols; cols++) { int32_t rows = calculateNumberOfRows(sourceCodeWords, errorCorrectionCodeWords, cols); @@ -561,7 +561,7 @@ CFX_Int32Array* CBC_PDF417::determineDimensions( dimension->Add(cols); dimension->Add(rows); } - if (dimension == NULL) { + if (!dimension) { int32_t rows = calculateNumberOfRows(sourceCodeWords, errorCorrectionCodeWords, m_minCols); if (rows < m_minRows) { @@ -574,9 +574,9 @@ CFX_Int32Array* CBC_PDF417::determineDimensions( dimension->Add(rows); } } - if (dimension == NULL) { + if (!dimension) { e = BCExceptionUnableToFitMessageInColumns; - return NULL; + return nullptr; } return dimension; } -- cgit v1.2.3