diff options
author | weili <weili@chromium.org> | 2016-08-09 10:33:10 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-09 10:33:10 -0700 |
commit | 16fccc51456dbab7e392c3952cc367723f9694f6 (patch) | |
tree | 0bd44bec6b81213db9d1dc487237164cdcaa43a4 /xfa/fxgraphics/cfx_path.h | |
parent | af7ab33c73f58f18d0db0c90d93fa0aab0bc83f3 (diff) | |
download | pdfium-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/cfx_path.h')
-rw-r--r-- | xfa/fxgraphics/cfx_path.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/xfa/fxgraphics/cfx_path.h b/xfa/fxgraphics/cfx_path.h index f42586f0de..bfef04e591 100644 --- a/xfa/fxgraphics/cfx_path.h +++ b/xfa/fxgraphics/cfx_path.h @@ -7,16 +7,18 @@ #ifndef XFA_FXGRAPHICS_CFX_PATH_H_ #define XFA_FXGRAPHICS_CFX_PATH_H_ +#include <memory> + #include "core/fxcrt/include/fx_system.h" #include "xfa/fxgraphics/include/cfx_graphics.h" class CFX_PathData; class CFX_PathGenerator; -class CFX_Path { +class CFX_Path final { public: CFX_Path(); - virtual ~CFX_Path(); + ~CFX_Path(); FWL_Error Create(); FWL_Error MoveTo(FX_FLOAT x, FX_FLOAT y); @@ -68,11 +70,11 @@ class CFX_Path { FWL_Error AddSubpath(CFX_Path* path); FWL_Error Clear(); - FX_BOOL IsEmpty(); - CFX_PathData* GetPathData(); + FX_BOOL IsEmpty() const; + CFX_PathData* GetPathData() const; private: - CFX_PathGenerator* m_generator; + std::unique_ptr<CFX_PathGenerator> m_generator; }; #endif // XFA_FXGRAPHICS_CFX_PATH_H_ |