summaryrefslogtreecommitdiff
path: root/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDecoder.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2016-02-24 18:20:51 -0800
committerLei Zhang <thestig@chromium.org>2016-02-24 18:20:51 -0800
commit2e6864282e65c55ff6809f5aaae011b31c3a361a (patch)
tree98daecaf078529986a4efc2c43a3f43c0dcc01dd /xfa/src/fxbarcode/datamatrix/BC_DataMatrixDecoder.cpp
parent969ea09df096b987662b9658e3ffa023ca4ebf70 (diff)
downloadpdfium-2e6864282e65c55ff6809f5aaae011b31c3a361a.tar.xz
Get rid of CBC_AutoPtr and use std::unique_ptr instead.
Also fix IWYU in various fxbarcode headers. R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1734823002 .
Diffstat (limited to 'xfa/src/fxbarcode/datamatrix/BC_DataMatrixDecoder.cpp')
-rw-r--r--xfa/src/fxbarcode/datamatrix/BC_DataMatrixDecoder.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDecoder.cpp b/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDecoder.cpp
index 49a1d1654a..423cefc65f 100644
--- a/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDecoder.cpp
+++ b/xfa/src/fxbarcode/datamatrix/BC_DataMatrixDecoder.cpp
@@ -20,13 +20,16 @@
* limitations under the License.
*/
+#include "xfa/src/fxbarcode/datamatrix/BC_DataMatrixDecoder.h"
+
+#include <memory>
+
#include "xfa/src/fxbarcode/common/BC_CommonBitMatrix.h"
#include "xfa/src/fxbarcode/common/reedsolomon/BC_ReedSolomonDecoder.h"
#include "xfa/src/fxbarcode/common/reedsolomon/BC_ReedSolomonGF256.h"
#include "xfa/src/fxbarcode/datamatrix/BC_DataMatrixBitMatrixParser.h"
#include "xfa/src/fxbarcode/datamatrix/BC_DataMatrixDataBlock.h"
#include "xfa/src/fxbarcode/datamatrix/BC_DataMatrixDecodedBitStreamParser.h"
-#include "xfa/src/fxbarcode/datamatrix/BC_DataMatrixDecoder.h"
#include "xfa/src/fxbarcode/datamatrix/BC_DataMatrixVersion.h"
CBC_DataMatrixDecoder::CBC_DataMatrixDecoder() {
@@ -46,9 +49,8 @@ CBC_CommonDecoderResult* CBC_DataMatrixDecoder::Decode(
parser.Init(bits, e);
BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
CBC_DataMatrixVersion* version = parser.GetVersion();
- CFX_ByteArray* byteTemp = parser.ReadCodewords(e);
+ std::unique_ptr<CFX_ByteArray> codewords(parser.ReadCodewords(e));
BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
- CBC_AutoPtr<CFX_ByteArray> codewords(byteTemp);
CFX_PtrArray* dataBlocks =
CBC_DataMatrixDataBlock::GetDataBlocks(codewords.get(), version, e);
BC_EXCEPTION_CHECK_ReturnValue(e, NULL);