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

Unified Diff: xfa/fxbarcode/oned/BC_OnedUPCAWriter.h

Issue 2221023003: Use smart pointers for class owned pointers in xfa/fxbarcode (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comments Created 4 years, 4 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
« no previous file with comments | « xfa/fxbarcode/oned/BC_OneDimWriter.cpp ('k') | xfa/fxbarcode/oned/BC_OnedUPCAWriter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxbarcode/oned/BC_OnedUPCAWriter.h
diff --git a/xfa/fxbarcode/oned/BC_OnedUPCAWriter.h b/xfa/fxbarcode/oned/BC_OnedUPCAWriter.h
index 8257dfa4b65ff22f8b0aac846765274c18270cb3..b38a235076448eff64321fdbd02ea6109f92ba78 100644
--- a/xfa/fxbarcode/oned/BC_OnedUPCAWriter.h
+++ b/xfa/fxbarcode/oned/BC_OnedUPCAWriter.h
@@ -7,6 +7,8 @@
#ifndef XFA_FXBARCODE_ONED_BC_ONEDUPCAWRITER_H_
#define XFA_FXBARCODE_ONED_BC_ONEDUPCAWRITER_H_
+#include <memory>
+
#include "core/fxcrt/include/fx_string.h"
#include "core/fxcrt/include/fx_system.h"
#include "xfa/fxbarcode/oned/BC_OneDimWriter.h"
@@ -21,8 +23,6 @@ class CBC_OnedUPCAWriter : public CBC_OneDimWriter {
CBC_OnedUPCAWriter();
~CBC_OnedUPCAWriter() override;
- virtual void Init();
-
// CBC_OneDimWriter
uint8_t* Encode(const CFX_ByteString& contents,
BCFORMAT format,
@@ -46,6 +46,8 @@ class CBC_OnedUPCAWriter : public CBC_OneDimWriter {
int32_t& e) override;
FX_BOOL CheckContentValidity(const CFX_WideStringC& contents) override;
CFX_WideString FilterContents(const CFX_WideStringC& contents) override;
+
+ void Init();
int32_t CalcChecksum(const CFX_ByteString& contents);
protected:
@@ -58,7 +60,7 @@ class CBC_OnedUPCAWriter : public CBC_OneDimWriter {
int32_t& e) override;
private:
- CBC_OnedEAN13Writer* m_subWriter;
+ std::unique_ptr<CBC_OnedEAN13Writer> m_subWriter;
};
#endif // XFA_FXBARCODE_ONED_BC_ONEDUPCAWRITER_H_
« no previous file with comments | « xfa/fxbarcode/oned/BC_OneDimWriter.cpp ('k') | xfa/fxbarcode/oned/BC_OnedUPCAWriter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698