summaryrefslogtreecommitdiff
path: root/xfa/src/fxbarcode/oned/BC_OneDimReader.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/oned/BC_OneDimReader.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/oned/BC_OneDimReader.cpp')
-rw-r--r--xfa/src/fxbarcode/oned/BC_OneDimReader.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/xfa/src/fxbarcode/oned/BC_OneDimReader.cpp b/xfa/src/fxbarcode/oned/BC_OneDimReader.cpp
index 74f0db4068..da1f47bfe8 100644
--- a/xfa/src/fxbarcode/oned/BC_OneDimReader.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OneDimReader.cpp
@@ -20,10 +20,13 @@
* limitations under the License.
*/
+#include "xfa/src/fxbarcode/oned/BC_OneDimReader.h"
+
+#include <memory>
+
#include "xfa/src/fxbarcode/BC_Reader.h"
#include "xfa/src/fxbarcode/common/BC_CommonBitArray.h"
#include "xfa/src/fxbarcode/oned/BC_OneDReader.h"
-#include "xfa/src/fxbarcode/oned/BC_OneDimReader.h"
#include "xfa/src/fxbarcode/utils.h"
const int32_t CBC_OneDimReader::MAX_AVG_VARIANCE = (int32_t)(256 * 0.48f);
@@ -73,9 +76,8 @@ CFX_ByteString CBC_OneDimReader::DecodeRow(int32_t rowNumber,
CBC_CommonBitArray* row,
int32_t hints,
int32_t& e) {
- CFX_Int32Array* StartPattern = FindStartGuardPattern(row, e);
+ std::unique_ptr<CFX_Int32Array> result(FindStartGuardPattern(row, e));
BC_EXCEPTION_CHECK_ReturnValue(e, "");
- CBC_AutoPtr<CFX_Int32Array> result(StartPattern);
CFX_ByteString temp = DecodeRow(rowNumber, row, result.get(), hints, e);
BC_EXCEPTION_CHECK_ReturnValue(e, "");
return temp;