Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1534)

Unified Diff: xfa/src/fxbarcode/qrcode/BC_QRFinderPatternFinder.cpp

Issue 1734823002: Get rid of CBC_AutoPtr and use std::unique_ptr instead. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: xfa/src/fxbarcode/qrcode/BC_QRFinderPatternFinder.cpp
diff --git a/xfa/src/fxbarcode/qrcode/BC_QRFinderPatternFinder.cpp b/xfa/src/fxbarcode/qrcode/BC_QRFinderPatternFinder.cpp
index d143e276bb3ec5e14de5cb8a3d2288f2fbdf66c8..f5a3c7aeadd8f52ecae811f041ef66df999711ae 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());
}

Powered by Google App Engine
This is Rietveld 408576698