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

Unified Diff: xfa/src/fxbarcode/oned/BC_OneDimReader.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/oned/BC_OneDimReader.cpp
diff --git a/xfa/src/fxbarcode/oned/BC_OneDimReader.cpp b/xfa/src/fxbarcode/oned/BC_OneDimReader.cpp
index 74f0db40686f166a1d18ae4281213131ee1721be..da1f47bfe8ae90f7c925de7d9a206db87ca07b27 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;

Powered by Google App Engine
This is Rietveld 408576698