summaryrefslogtreecommitdiff
path: root/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.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/qrcode/BC_QRCoderEncoder.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/qrcode/BC_QRCoderEncoder.cpp')
-rw-r--r--xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp b/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp
index eb7642649d..812b7926ac 100644
--- a/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp
+++ b/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp
@@ -256,8 +256,8 @@ int32_t CBC_QRCoderEncoder::GetSpanByVersion(CBC_QRCoderMode* modeFirst,
void CBC_QRCoderEncoder::MergeString(CFX_ArrayTemplate<Make_Pair*>* result,
int32_t versionNum,
int32_t& e) {
- Make_Pair* first = NULL;
- Make_Pair* second = NULL;
+ Make_Pair* first = nullptr;
+ Make_Pair* second = nullptr;
size_t mergeNum = 0;
int32_t i;
for (i = 0; ((i < result->GetSize()) && (i + 1 < result->GetSize())); i++) {
@@ -358,7 +358,7 @@ void CBC_QRCoderEncoder::EncodeWithSpecifyVersion(
dataBits.Init();
SplitString(content, &splitResult);
MergeString(&splitResult, versionSpecify, e);
- BC_EXCEPTION_CHECK_ReturnVoid(e) CBC_QRCoderMode* tempMode = NULL;
+ BC_EXCEPTION_CHECK_ReturnVoid(e) CBC_QRCoderMode* tempMode = nullptr;
for (int32_t i = 0; i < splitResult.GetSize(); i++) {
AppendBytes(splitResult[i]->m_string, splitResult[i]->m_mode, &dataBits,
encoding, e);
@@ -428,7 +428,7 @@ void CBC_QRCoderEncoder::EncodeWithAutoVersion(
SplitString(content, &splitResult);
MergeString(&splitResult, 8, e);
BC_EXCEPTION_CHECK_ReturnVoid(e);
- CBC_QRCoderMode* tempMode = NULL;
+ CBC_QRCoderMode* tempMode = nullptr;
for (int32_t i = 0; i < splitResult.GetSize(); i++) {
AppendBytes(splitResult[i]->m_string, splitResult[i]->m_mode, &dataBits,
encoding, e);
@@ -442,7 +442,7 @@ void CBC_QRCoderEncoder::EncodeWithAutoVersion(
InitQRCode(numInputBytes, ecLevel, mode, qrCode, e);
BC_EXCEPTION_CHECK_ReturnVoid(e) CBC_QRCoderBitVector headerAndDataBits;
headerAndDataBits.Init();
- tempMode = NULL;
+ tempMode = nullptr;
int32_t versionNum = qrCode->GetVersion();
sign:
AppendDataModeLenghInfo(splitResult, headerAndDataBits, tempMode, qrCode,
@@ -934,7 +934,7 @@ CBC_CommonByteArray* CBC_QRCoderEncoder::GenerateECBytes(
CBC_ReedSolomonEncoder encode(CBC_ReedSolomonGF256::QRCodeFild);
encode.Init();
encode.Encode(&toEncode, numEcBytesInBlock, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
CBC_CommonByteArray* ecBytes = new CBC_CommonByteArray(numEcBytesInBlock);
for (int32_t j = 0; j < numEcBytesInBlock; j++) {
ecBytes->Set(j, toEncode[numDataBytes + j]);