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

Unified Diff: xfa/fxbarcode/datamatrix/BC_DataMatrixDecodedBitStreamParser.cpp

Issue 1908073003: Make CFX_BasicArray non-copyable. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 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 | « core/fxcrt/include/fx_basic.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxbarcode/datamatrix/BC_DataMatrixDecodedBitStreamParser.cpp
diff --git a/xfa/fxbarcode/datamatrix/BC_DataMatrixDecodedBitStreamParser.cpp b/xfa/fxbarcode/datamatrix/BC_DataMatrixDecodedBitStreamParser.cpp
index 693b6b920978f231349d7269626db5cc11efbb28..88a52b9e74d51a9a253aec22d65205b69685624a 100644
--- a/xfa/fxbarcode/datamatrix/BC_DataMatrixDecodedBitStreamParser.cpp
+++ b/xfa/fxbarcode/datamatrix/BC_DataMatrixDecodedBitStreamParser.cpp
@@ -48,6 +48,7 @@ const int32_t CBC_DataMatrixDecodedBitStreamParser::EDIFACT_ENCODE = 5;
const int32_t CBC_DataMatrixDecodedBitStreamParser::BASE256_ENCODE = 6;
CBC_DataMatrixDecodedBitStreamParser::CBC_DataMatrixDecodedBitStreamParser() {}
CBC_DataMatrixDecodedBitStreamParser::~CBC_DataMatrixDecodedBitStreamParser() {}
+
CBC_CommonDecoderResult* CBC_DataMatrixDecodedBitStreamParser::Decode(
CFX_ByteArray& bytes,
int32_t& e) {
@@ -59,32 +60,32 @@ CBC_CommonDecoderResult* CBC_DataMatrixDecodedBitStreamParser::Decode(
do {
if (mode == 1) {
mode = DecodeAsciiSegment(&bits, result, resultTrailer, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
} else {
switch (mode) {
case 2:
DecodeC40Segment(&bits, result, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
break;
case 3:
DecodeTextSegment(&bits, result, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
break;
case 4:
DecodeAnsiX12Segment(&bits, result, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
break;
case 5:
DecodeEdifactSegment(&bits, result, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
break;
case 6:
DecodeBase256Segment(&bits, result, byteSegments, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
break;
default:
e = BCExceptionFormatException;
- return NULL;
+ return nullptr;
}
mode = ASCII_ENCODE;
}
@@ -93,12 +94,11 @@ CBC_CommonDecoderResult* CBC_DataMatrixDecodedBitStreamParser::Decode(
result += resultTrailer;
}
CBC_CommonDecoderResult* tempCp = new CBC_CommonDecoderResult();
- tempCp->Init(bytes, result,
- (byteSegments.GetSize() <= 0) ? CFX_Int32Array() : byteSegments,
- NULL, e);
- BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
+ tempCp->Init(bytes, result, byteSegments, nullptr, e);
+ BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
return tempCp;
}
+
int32_t CBC_DataMatrixDecodedBitStreamParser::DecodeAsciiSegment(
CBC_CommonBitSource* bits,
CFX_ByteString& result,
« no previous file with comments | « core/fxcrt/include/fx_basic.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698