diff options
author | tsepez <tsepez@chromium.org> | 2016-12-14 05:57:10 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-12-14 05:57:10 -0800 |
commit | a9caab94c1f16929e5acf2676117224617d80f53 (patch) | |
tree | d71ff9a82fae6e6080deb76375f43056127b3ee2 /xfa/fwl/theme/cfwl_checkboxtp.cpp | |
parent | 992ecf7c189e5cabf43e5ad862511cf63d030966 (diff) | |
download | pdfium-a9caab94c1f16929e5acf2676117224617d80f53.tar.xz |
Avoid the ptr.reset(new XXX()) anti-pattern
Be suspicious of |new|. This removes some of the
easy cases.
Review-Url: https://codereview.chromium.org/2571913002
Diffstat (limited to 'xfa/fwl/theme/cfwl_checkboxtp.cpp')
-rw-r--r-- | xfa/fwl/theme/cfwl_checkboxtp.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xfa/fwl/theme/cfwl_checkboxtp.cpp b/xfa/fwl/theme/cfwl_checkboxtp.cpp index 4ff2ccd2a6..9109cb61c4 100644 --- a/xfa/fwl/theme/cfwl_checkboxtp.cpp +++ b/xfa/fwl/theme/cfwl_checkboxtp.cpp @@ -7,6 +7,7 @@ #include "xfa/fwl/theme/cfwl_checkboxtp.h" #include "core/fxge/cfx_pathdata.h" +#include "third_party/base/ptr_util.h" #include "xfa/fde/tto/fde_textout.h" #include "xfa/fwl/cfwl_checkbox.h" #include "xfa/fwl/cfwl_themebackground.h" @@ -219,7 +220,7 @@ void CFWL_CheckBoxTP::SetThemeData() { void CFWL_CheckBoxTP::InitCheckPath(FX_FLOAT fCheckLen) { if (!m_pCheckPath) { - m_pCheckPath.reset(new CFX_Path); + m_pCheckPath = pdfium::MakeUnique<CFX_Path>(); m_pCheckPath->Create(); FX_FLOAT fWidth = kSignPath; FX_FLOAT fHeight = -kSignPath; |