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

Unified Diff: xfa/fxbarcode/qrcode/BC_QRCoderDecoder.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_QRCoder.cpp ('k') | xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxbarcode/qrcode/BC_QRCoderDecoder.cpp
diff --git a/xfa/fxbarcode/qrcode/BC_QRCoderDecoder.cpp b/xfa/fxbarcode/qrcode/BC_QRCoderDecoder.cpp
index 360a69a0ecf18bc03910e74c68dd2f41ec755fde..97219ddd729914ec863224605857d80657861028 100644
--- a/xfa/fxbarcode/qrcode/BC_QRCoderDecoder.cpp
+++ b/xfa/fxbarcode/qrcode/BC_QRCoderDecoder.cpp
@@ -35,7 +35,7 @@
#include "xfa/fxbarcode/qrcode/BC_QRDecodedBitStreamParser.h"
CBC_QRCoderDecoder::CBC_QRCoderDecoder() {
- m_rsDecoder = NULL;
+ m_rsDecoder = nullptr;
}
void CBC_QRCoderDecoder::Init() {
@@ -58,7 +58,7 @@ CBC_CommonDecoderResult* CBC_QRCoderDecoder::Decode(FX_BOOL* image,
}
}
CBC_CommonDecoderResult* cdr = Decode(&bits, height, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
return cdr;
}
CBC_CommonDecoderResult* CBC_QRCoderDecoder::Decode(CBC_CommonBitMatrix* bits,
@@ -66,17 +66,17 @@ CBC_CommonDecoderResult* CBC_QRCoderDecoder::Decode(CBC_CommonBitMatrix* bits,
int32_t& e) {
CBC_QRBitMatrixParser parser;
parser.Init(bits, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
CBC_QRCoderVersion* version = parser.ReadVersion(e);
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
CBC_QRCoderFormatInformation* temp = parser.ReadFormatInformation(e);
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
CBC_QRCoderErrorCorrectionLevel* ecLevel = temp->GetErrorCorrectionLevel();
std::unique_ptr<CFX_ByteArray> codewords(parser.ReadCodewords(e));
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
CFX_ArrayTemplate<CBC_QRDataBlock*>* dataBlocks =
CBC_QRDataBlock::GetDataBlocks(codewords.get(), version, ecLevel, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
int32_t totalBytes = 0;
for (int32_t i = 0; i < dataBlocks->GetSize(); i++) {
totalBytes += (*dataBlocks)[i]->GetNumDataCodewords();
@@ -92,7 +92,7 @@ CBC_CommonDecoderResult* CBC_QRCoderDecoder::Decode(CBC_CommonBitMatrix* bits,
delete (*dataBlocks)[k];
}
delete dataBlocks;
- return NULL;
+ return nullptr;
}
for (int32_t i = 0; i < numDataCodewords; i++) {
resultBytes.Add((*codewordBytes)[i]);
@@ -104,7 +104,7 @@ CBC_CommonDecoderResult* CBC_QRCoderDecoder::Decode(CBC_CommonBitMatrix* bits,
delete dataBlocks;
CBC_CommonDecoderResult* cdr = CBC_QRDecodedBitStreamParser::Decode(
&resultBytes, version, ecLevel, byteModeDecode, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
return cdr;
}
void CBC_QRCoderDecoder::CorrectErrors(CFX_ByteArray* codewordBytes,
« no previous file with comments | « xfa/fxbarcode/qrcode/BC_QRCoder.cpp ('k') | xfa/fxbarcode/qrcode/BC_QRCoderEncoder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698