summaryrefslogtreecommitdiff
path: root/xfa/fxbarcode/BC_TwoDimWriter.h
diff options
context:
space:
mode:
authorweili <weili@chromium.org>2016-08-09 13:45:03 -0700
committerCommit bot <commit-bot@chromium.org>2016-08-09 13:45:03 -0700
commite76203dbefd1df075a063ee019c3908513f6bee5 (patch)
tree2a763852e1d1de3eee6a67285ea96be2874bfb00 /xfa/fxbarcode/BC_TwoDimWriter.h
parentad5ac7584844b03c5ceed082e5f5158a632405cc (diff)
downloadpdfium-e76203dbefd1df075a063ee019c3908513f6bee5.tar.xz
Use smart pointers for class owned pointers in xfa/fxbarcode
For classes under xfa/fxbarcode, use smart pointers instead of raw pointer to make memory management easier. Also fix some styling issues along the changes. BUG=pdfium:518 Review-Url: https://codereview.chromium.org/2221023003
Diffstat (limited to 'xfa/fxbarcode/BC_TwoDimWriter.h')
-rw-r--r--xfa/fxbarcode/BC_TwoDimWriter.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/xfa/fxbarcode/BC_TwoDimWriter.h b/xfa/fxbarcode/BC_TwoDimWriter.h
index da2e6d9c4d..76f176bfaf 100644
--- a/xfa/fxbarcode/BC_TwoDimWriter.h
+++ b/xfa/fxbarcode/BC_TwoDimWriter.h
@@ -7,6 +7,8 @@
#ifndef XFA_FXBARCODE_BC_TWODIMWRITER_H_
#define XFA_FXBARCODE_BC_TWODIMWRITER_H_
+#include <memory>
+
#include "xfa/fxbarcode/BC_Writer.h"
class CBC_CommonBitMatrix;
@@ -25,12 +27,13 @@ class CBC_TwoDimWriter : public CBC_Writer {
virtual void RenderDeviceResult(CFX_RenderDevice* device,
const CFX_Matrix* matrix);
virtual FX_BOOL SetErrorCorrectionLevel(int32_t level) = 0;
- virtual int32_t GetErrorCorrectionLevel();
+
+ int32_t GetErrorCorrectionLevel() const;
protected:
int32_t m_iCorrectLevel;
FX_BOOL m_bFixedSize;
- CBC_CommonBitMatrix* m_output;
+ std::unique_ptr<CBC_CommonBitMatrix> m_output;
};
#endif // XFA_FXBARCODE_BC_TWODIMWRITER_H_