summaryrefslogtreecommitdiff
path: root/xfa/fxbarcode/BC_BinaryBitmap.cpp
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-06-09 18:39:33 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-09 18:39:33 -0700
commit6dc1d7753691c0ff2f390e8ffd95a3182064487e (patch)
tree43d77664973a76c107832ae7b3c3e0f04bba1fe0 /xfa/fxbarcode/BC_BinaryBitmap.cpp
parentfcf61b39ee597c73e80ba789833fb7fe49878422 (diff)
downloadpdfium-6dc1d7753691c0ff2f390e8ffd95a3182064487e.tar.xz
Get rid of NULLs in xfa/fxbarcode/
Review-Url: https://codereview.chromium.org/2048983002
Diffstat (limited to 'xfa/fxbarcode/BC_BinaryBitmap.cpp')
-rw-r--r--xfa/fxbarcode/BC_BinaryBitmap.cpp12
1 files changed, 6 insertions, 6 deletions
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;
}