From eaeba99ac06c34ad92493d16be303564174f2e09 Mon Sep 17 00:00:00 2001 From: favoritas37 Date: Thu, 18 Jun 2015 23:57:36 +0300 Subject: [PATCH] continuation commit after the refactoring of ECBlocks --- source/zxing/zxing/qrcode/decoder/QRDataBlock.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/zxing/zxing/qrcode/decoder/QRDataBlock.cpp b/source/zxing/zxing/qrcode/decoder/QRDataBlock.cpp index 469b958..ef1dc96 100644 --- a/source/zxing/zxing/qrcode/decoder/QRDataBlock.cpp +++ b/source/zxing/zxing/qrcode/decoder/QRDataBlock.cpp @@ -62,7 +62,7 @@ std::vector > DataBlock::getDataBlocks(ArrayRef rawCodeword ECB *ecBlock = ecBlockArray[j]; for (int i = 0; i < ecBlock->getCount(); i++) { int numDataCodewords = ecBlock->getDataCodewords(); - int numBlockCodewords = ecBlocks.getECCodewords() + numDataCodewords; + int numBlockCodewords = ecBlocks.getECCodewordsPerBloc() + numDataCodewords; ArrayRef buffer(numBlockCodewords); Ref blockRef(new DataBlock(numDataCodewords, buffer)); result[numResultBlocks++] = blockRef; @@ -85,7 +85,7 @@ std::vector > DataBlock::getDataBlocks(ArrayRef rawCodeword } longerBlocksStartAt++; - int shorterBlocksNumDataCodewords = shorterBlocksTotalCodewords - ecBlocks.getECCodewords(); + int shorterBlocksNumDataCodewords = shorterBlocksTotalCodewords - ecBlocks.getECCodewordsPerBloc(); // The last elements of result may be 1 element longer; // first fill out as many elements as all of them have int rawCodewordsOffset = 0;