summaryrefslogtreecommitdiff
path: root/xfa/fwl/basewidget/cfx_barcode.h
diff options
context:
space:
mode:
authorweili <weili@chromium.org>2016-08-04 16:37:48 -0700
committerCommit bot <commit-bot@chromium.org>2016-08-04 16:37:48 -0700
commit1b4f6b36b3ed8d1f6cea96bc32c1b376f4a499bc (patch)
treeaa3ba6730495096411f2a3555c74e83f5d1fca11 /xfa/fwl/basewidget/cfx_barcode.h
parent52a5005c453a9e08384e375ae51c5f1ad628fe86 (diff)
downloadpdfium-1b4f6b36b3ed8d1f6cea96bc32c1b376f4a499bc.tar.xz
Use smart pointers for class owned pointers
For classes under xfa/fgas, xfa/fwl/basewidget, and xfa/fwl/core, use smart pointers instead of raw pointer to make memory management easier. BUG=pdfium:518 Review-Url: https://codereview.chromium.org/2207093005
Diffstat (limited to 'xfa/fwl/basewidget/cfx_barcode.h')
-rw-r--r--xfa/fwl/basewidget/cfx_barcode.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/xfa/fwl/basewidget/cfx_barcode.h b/xfa/fwl/basewidget/cfx_barcode.h
index 2ba1f7f77d..758ba20b1a 100644
--- a/xfa/fwl/basewidget/cfx_barcode.h
+++ b/xfa/fwl/basewidget/cfx_barcode.h
@@ -7,6 +7,8 @@
#ifndef XFA_FWL_BASEWIDGET_CFX_BARCODE_H_
#define XFA_FWL_BASEWIDGET_CFX_BARCODE_H_
+#include <memory>
+
#include "core/fxcrt/include/fx_coordinates.h"
#include "core/fxcrt/include/fx_string.h"
#include "core/fxcrt/include/fx_system.h"
@@ -52,7 +54,7 @@ class CFX_Barcode {
FX_BOOL SetTruncated(FX_BOOL truncated);
protected:
- CBC_CodeBase* m_pBCEngine;
+ std::unique_ptr<CBC_CodeBase> m_pBCEngine;
};
#endif // XFA_FWL_BASEWIDGET_CFX_BARCODE_H_