From 36eb4bdcae719cf33c536ff72ac000482aed8382 Mon Sep 17 00:00:00 2001 From: tsepez Date: Mon, 3 Oct 2016 15:24:27 -0700 Subject: Add ptr_util.h from base until std::make_unique<> available Review-Url: https://codereview.chromium.org/2386273004 --- core/fxge/dib/fx_dib_transform.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'core/fxge/dib/fx_dib_transform.cpp') diff --git a/core/fxge/dib/fx_dib_transform.cpp b/core/fxge/dib/fx_dib_transform.cpp index a559fee55d..559c6e2a38 100644 --- a/core/fxge/dib/fx_dib_transform.cpp +++ b/core/fxge/dib/fx_dib_transform.cpp @@ -7,6 +7,7 @@ #include "core/fxge/dib/dib_int.h" #include "core/fxge/fx_dib.h" +#include "third_party/base/ptr_util.h" namespace { @@ -363,8 +364,8 @@ FX_BOOL CFX_ImageTransformer::Start() { result_clip.Offset(-result_rect.left, -result_rect.top); result_clip = FXDIB_SwapClipBox(result_clip, dest_width, dest_height, m_pMatrix->c > 0, m_pMatrix->b < 0); - m_Stretcher = WrapUnique(new CFX_ImageStretcher( - &m_Storer, m_pSrc, dest_height, dest_width, result_clip, m_Flags)); + m_Stretcher = pdfium::MakeUnique( + &m_Storer, m_pSrc, dest_height, dest_width, result_clip, m_Flags); m_Stretcher->Start(); m_Status = 1; return TRUE; @@ -376,8 +377,8 @@ FX_BOOL CFX_ImageTransformer::Start() { int dest_height = m_pMatrix->d > 0 ? (int)-FXSYS_ceil(m_pMatrix->d) : (int)-FXSYS_floor(m_pMatrix->d); result_clip.Offset(-result_rect.left, -result_rect.top); - m_Stretcher = WrapUnique(new CFX_ImageStretcher( - &m_Storer, m_pSrc, dest_width, dest_height, result_clip, m_Flags)); + m_Stretcher = pdfium::MakeUnique( + &m_Storer, m_pSrc, dest_width, dest_height, result_clip, m_Flags); m_Stretcher->Start(); m_Status = 2; return TRUE; @@ -395,9 +396,8 @@ FX_BOOL CFX_ImageTransformer::Start() { clip_rect_f.Transform(&m_dest2stretch); m_StretchClip = clip_rect_f.GetOuterRect(); m_StretchClip.Intersect(0, 0, stretch_width, stretch_height); - m_Stretcher = WrapUnique(new CFX_ImageStretcher(&m_Storer, m_pSrc, - stretch_width, stretch_height, - m_StretchClip, m_Flags)); + m_Stretcher = pdfium::MakeUnique( + &m_Storer, m_pSrc, stretch_width, stretch_height, m_StretchClip, m_Flags); m_Stretcher->Start(); m_Status = 3; return TRUE; -- cgit v1.2.3