From f082e12bc5f3e351e9d1f85f3983ccbb84030441 Mon Sep 17 00:00:00 2001 From: SebGDev Date: Wed, 21 Jan 2015 10:47:47 +0100 Subject: [PATCH] Remove of unnecessary bytes array --- .../zxing/datamatrix/decoder/DecodedBitStreamParser.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/core/src/zxing/datamatrix/decoder/DecodedBitStreamParser.cpp b/core/src/zxing/datamatrix/decoder/DecodedBitStreamParser.cpp index 493f584..60d90e9 100644 --- a/core/src/zxing/datamatrix/decoder/DecodedBitStreamParser.cpp +++ b/core/src/zxing/datamatrix/decoder/DecodedBitStreamParser.cpp @@ -399,16 +399,15 @@ void DecodedBitStreamParser::decodeBase256Segment(Ref bits, ostringst throw FormatException("NegativeArraySizeException"); } - ArrayRef bytes(count); for (int i = 0; i < count; i++) { // Have seen this particular error in the wild, such as at // http://www.bcgen.com/demo/IDAutomationStreamingDataMatrix.aspx?MODE=3&D=Fred&PFMT=3&PT=F&X=0.3&O=0&LM=0.2 if (bits->available() < 8) { throw FormatException("byteSegments"); } - bytes[i] = unrandomize255State(bits->readBits(8), codewordPosition++); - byteSegments.push_back(bytes[i]); - result << (char)bytes[i]; + char byte = unrandomize255State(bits->readBits(8), codewordPosition++); + byteSegments.push_back(byte); + result << byte; } } }