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/BC_BinaryBitmap.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'xfa/fxbarcode/BC_BinaryBitmap.cpp') diff --git a/xfa/fxbarcode/BC_BinaryBitmap.cpp b/xfa/fxbarcode/BC_BinaryBitmap.cpp index ba08824efe..d8e866236b 100644 --- a/xfa/fxbarcode/BC_BinaryBitmap.cpp +++ b/xfa/fxbarcode/BC_BinaryBitmap.cpp @@ -28,7 +28,7 @@ #include "xfa/fxbarcode/utils.h" CBC_BinaryBitmap::CBC_BinaryBitmap(CBC_Binarizer* binarizer) - : m_binarizer(binarizer), m_matrix(NULL) {} + : m_binarizer(binarizer), m_matrix(nullptr) {} CBC_BinaryBitmap::~CBC_BinaryBitmap() { delete m_matrix; } @@ -39,9 +39,9 @@ int32_t CBC_BinaryBitmap::GetWidth() { return m_binarizer->GetLuminanceSource()->GetWidth(); } CBC_CommonBitMatrix* CBC_BinaryBitmap::GetMatrix(int32_t& e) { - if (m_matrix == NULL) { + if (!m_matrix) { m_matrix = m_binarizer->GetBlackMatrix(e); - BC_EXCEPTION_CHECK_ReturnValue(e, NULL); + BC_EXCEPTION_CHECK_ReturnValue(e, nullptr); } return m_matrix; } @@ -49,13 +49,13 @@ CBC_CommonBitArray* CBC_BinaryBitmap::GetBlackRow(int32_t y, CBC_CommonBitArray* row, int32_t& e) { CBC_CommonBitArray* temp = m_binarizer->GetBlackRow(y, row, e); - BC_EXCEPTION_CHECK_ReturnValue(e, NULL); + BC_EXCEPTION_CHECK_ReturnValue(e, nullptr); return temp; } CBC_CommonBitMatrix* CBC_BinaryBitmap::GetBlackMatrix(int32_t& e) { - if (m_matrix == NULL) { + if (!m_matrix) { m_matrix = m_binarizer->GetBlackMatrix(e); - BC_EXCEPTION_CHECK_ReturnValue(e, NULL); + BC_EXCEPTION_CHECK_ReturnValue(e, nullptr); } return m_matrix; } -- cgit v1.2.3