summaryrefslogtreecommitdiff
path: root/xfa/src/fxbarcode/qrcode/BC_QRFinderPatternFinder.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/qrcode/BC_QRFinderPatternFinder.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/qrcode/BC_QRFinderPatternFinder.cpp')
-rw-r--r--xfa/src/fxbarcode/qrcode/BC_QRFinderPatternFinder.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/xfa/src/fxbarcode/qrcode/BC_QRFinderPatternFinder.cpp b/xfa/src/fxbarcode/qrcode/BC_QRFinderPatternFinder.cpp
index d143e276bb..f5a3c7aead 100644
--- a/xfa/src/fxbarcode/qrcode/BC_QRFinderPatternFinder.cpp
+++ b/xfa/src/fxbarcode/qrcode/BC_QRFinderPatternFinder.cpp
@@ -20,12 +20,15 @@
* limitations under the License.
*/
+#include "xfa/src/fxbarcode/qrcode/BC_QRFinderPatternFinder.h"
+
+#include <memory>
+
#include "core/include/fxcrt/fx_basic.h"
#include "xfa/src/fxbarcode/BC_ResultPoint.h"
#include "xfa/src/fxbarcode/common/BC_CommonBitMatrix.h"
#include "xfa/src/fxbarcode/qrcode/BC_FinderPatternInfo.h"
#include "xfa/src/fxbarcode/qrcode/BC_QRFinderPattern.h"
-#include "xfa/src/fxbarcode/qrcode/BC_QRFinderPatternFinder.h"
#include "xfa/src/fxbarcode/utils.h"
const int32_t CBC_QRFinderPatternFinder::CENTER_QUORUM = 2;
@@ -158,9 +161,8 @@ CBC_QRFinderPatternInfo* CBC_QRFinderPatternFinder::Find(int32_t hint,
}
}
}
- CFX_PtrArray* ptr = SelectBestpatterns(e);
+ std::unique_ptr<CFX_PtrArray> patternInfo(SelectBestpatterns(e));
BC_EXCEPTION_CHECK_ReturnValue(e, NULL);
- CBC_AutoPtr<CFX_PtrArray> patternInfo(ptr);
OrderBestPatterns(patternInfo.get());
return new CBC_QRFinderPatternInfo(patternInfo.get());
}