From a9caab94c1f16929e5acf2676117224617d80f53 Mon Sep 17 00:00:00 2001 From: tsepez Date: Wed, 14 Dec 2016 05:57:10 -0800 Subject: 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 --- xfa/fxgraphics/cfx_path.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xfa/fxgraphics/cfx_path.cpp') diff --git a/xfa/fxgraphics/cfx_path.cpp b/xfa/fxgraphics/cfx_path.cpp index d02b7a8e48..3288631f15 100644 --- a/xfa/fxgraphics/cfx_path.cpp +++ b/xfa/fxgraphics/cfx_path.cpp @@ -7,6 +7,7 @@ #include "xfa/fxgraphics/cfx_path.h" #include "core/fxge/cfx_pathdata.h" +#include "third_party/base/ptr_util.h" #include "xfa/fxgraphics/cfx_path_generator.h" CFX_Path::CFX_Path() {} @@ -15,7 +16,7 @@ FWL_Error CFX_Path::Create() { if (m_generator) return FWL_Error::PropertyInvalid; - m_generator.reset(new CFX_PathGenerator()); + m_generator = pdfium::MakeUnique(); return FWL_Error::Succeeded; } -- cgit v1.2.3