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

Unified Diff: xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.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_OnedCodaBarReader.cpp
diff --git a/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.cpp b/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.cpp
index d7caf682264d056474e8c67773bdd135b9aa508b..3cbad1eade2c9eb8ae167d9fa49e83be5a61cb25 100644
--- a/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.cpp
+++ b/xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.cpp
@@ -20,13 +20,15 @@
* limitations under the License.
*/
+#include "xfa/src/fxbarcode/oned/BC_OnedCodaBarReader.h"
+
#include <algorithm>
+#include <memory>
#include "core/include/fxcrt/fx_basic.h"
#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_OnedCodaBarReader.h"
#include "xfa/src/fxbarcode/oned/BC_OnedCode39Reader.h"
#include "xfa/src/fxbarcode/utils.h"
@@ -46,9 +48,8 @@ CFX_ByteString CBC_OnedCodaBarReader::DecodeRow(int32_t rowNumber,
CBC_CommonBitArray* row,
int32_t hints,
int32_t& e) {
- CFX_Int32Array* int32Ptr = FindAsteriskPattern(row, e);
+ std::unique_ptr<CFX_Int32Array> start(FindAsteriskPattern(row, e));
BC_EXCEPTION_CHECK_ReturnValue(e, "");
- CBC_AutoPtr<CFX_Int32Array> start(int32Ptr);
(*start)[1] = 0;
int32_t nextStart = (*start)[1];
int32_t end = row->GetSize();

Powered by Google App Engine
This is Rietveld 408576698