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

Unified Diff: xfa/fxbarcode/qrcode/BC_QRCoderEncoder.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 | « xfa/fxbarcode/qrcode/BC_QRCoderDecoder.cpp ('k') | xfa/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp
diff --git a/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp b/xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp
index eb7642649d3c818c87b8224176b0c84aa84bbf20..812b7926ac707cebbb69fcd5e2460eb1131b0eb5 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]);
« no previous file with comments | « xfa/fxbarcode/qrcode/BC_QRCoderDecoder.cpp ('k') | xfa/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698