summaryrefslogtreecommitdiff
path: root/xfa/fxbarcode/datamatrix/BC_DataMatrixWriter.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/datamatrix/BC_DataMatrixWriter.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/datamatrix/BC_DataMatrixWriter.cpp')
-rw-r--r--xfa/fxbarcode/datamatrix/BC_DataMatrixWriter.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/xfa/fxbarcode/datamatrix/BC_DataMatrixWriter.cpp b/xfa/fxbarcode/datamatrix/BC_DataMatrixWriter.cpp
index 03cd5fba50..f056ece258 100644
--- a/xfa/fxbarcode/datamatrix/BC_DataMatrixWriter.cpp
+++ b/xfa/fxbarcode/datamatrix/BC_DataMatrixWriter.cpp
@@ -55,29 +55,29 @@ uint8_t* CBC_DataMatrixWriter::Encode(const CFX_WideString& contents,
int32_t& e) {
if (outWidth < 0 || outHeight < 0) {
e = BCExceptionHeightAndWidthMustBeAtLeast1;
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
}
CBC_SymbolShapeHint::SymbolShapeHint shape =
CBC_SymbolShapeHint::FORCE_SQUARE;
- CBC_Dimension* minSize = NULL;
- CBC_Dimension* maxSize = NULL;
+ CBC_Dimension* minSize = nullptr;
+ CBC_Dimension* maxSize = nullptr;
CFX_WideString ecLevel;
CFX_WideString encoded = CBC_HighLevelEncoder::encodeHighLevel(
contents, ecLevel, shape, minSize, maxSize, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
CBC_SymbolInfo* symbolInfo = CBC_SymbolInfo::lookup(
encoded.GetLength(), shape, minSize, maxSize, TRUE, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
CFX_WideString codewords =
CBC_ErrorCorrection::encodeECC200(encoded, symbolInfo, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
CBC_DefaultPlacement* placement =
new CBC_DefaultPlacement(codewords, symbolInfo->getSymbolDataWidth(e),
symbolInfo->getSymbolDataHeight(e));
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
placement->place();
CBC_CommonByteMatrix* bytematrix = encodeLowLevel(placement, symbolInfo, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
outWidth = bytematrix->GetWidth();
outHeight = bytematrix->GetHeight();
uint8_t* result = FX_Alloc2D(uint8_t, outWidth, outHeight);
@@ -91,12 +91,12 @@ CBC_CommonByteMatrix* CBC_DataMatrixWriter::encodeLowLevel(
CBC_SymbolInfo* symbolInfo,
int32_t& e) {
int32_t symbolWidth = symbolInfo->getSymbolDataWidth(e);
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
int32_t symbolHeight = symbolInfo->getSymbolDataHeight(e);
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
CBC_CommonByteMatrix* matrix = new CBC_CommonByteMatrix(
symbolInfo->getSymbolWidth(e), symbolInfo->getSymbolHeight(e));
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
matrix->Init();
int32_t matrixY = 0;
for (int32_t y = 0; y < symbolHeight; y++) {