summaryrefslogtreecommitdiff
path: root/xfa/fxgraphics/include/cfx_graphics.h
diff options
context:
space:
mode:
authorweili <weili@chromium.org>2016-08-09 10:33:10 -0700
committerCommit bot <commit-bot@chromium.org>2016-08-09 10:33:10 -0700
commit16fccc51456dbab7e392c3952cc367723f9694f6 (patch)
tree0bd44bec6b81213db9d1dc487237164cdcaa43a4 /xfa/fxgraphics/include/cfx_graphics.h
parentaf7ab33c73f58f18d0db0c90d93fa0aab0bc83f3 (diff)
downloadpdfium-16fccc51456dbab7e392c3952cc367723f9694f6.tar.xz
Use smart pointers for class owned pointers
For classes under xfa/fxfa/fm2js, and xfa/fxgraphics, 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/2222203002
Diffstat (limited to 'xfa/fxgraphics/include/cfx_graphics.h')
-rw-r--r--xfa/fxgraphics/include/cfx_graphics.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/xfa/fxgraphics/include/cfx_graphics.h b/xfa/fxgraphics/include/cfx_graphics.h
index 916fba57c7..e581089aec 100644
--- a/xfa/fxgraphics/include/cfx_graphics.h
+++ b/xfa/fxgraphics/include/cfx_graphics.h
@@ -7,6 +7,8 @@
#ifndef XFA_FXGRAPHICS_INCLUDE_CFX_GRAPHICS_H_
#define XFA_FXGRAPHICS_INCLUDE_CFX_GRAPHICS_H_
+#include <memory>
+
#include "core/fxcrt/include/fx_system.h"
#include "core/fxge/include/fx_dib.h"
#include "core/fxge/include/fx_ge.h"
@@ -230,7 +232,7 @@ class CFX_Graphics {
CFX_RenderDevice* m_renderDevice;
CFX_ArrayTemplate<TInfo*> m_infoStack;
- CAGG_Graphics* m_aggGraphics;
+ std::unique_ptr<CAGG_Graphics> m_aggGraphics;
friend class CAGG_Graphics;
};