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

Unified Diff: xfa/fxbarcode/BC_BinaryBitmap.cpp

Issue 2048983002: Get rid of NULLs in xfa/fxbarcode/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: nits Created 4 years, 6 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
« no previous file with comments | « no previous file | xfa/fxbarcode/BC_TwoDimWriter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxbarcode/BC_BinaryBitmap.cpp
diff --git a/xfa/fxbarcode/BC_BinaryBitmap.cpp b/xfa/fxbarcode/BC_BinaryBitmap.cpp
index ba08824efec0f507612f50d63e484fa04fcda031..d8e866236b939971a4f1b0c3ada3c1c3dc50fc06 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;
}
« no previous file with comments | « no previous file | xfa/fxbarcode/BC_TwoDimWriter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698