diff options
author | tsepez <tsepez@chromium.org> | 2016-12-06 06:29:28 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-12-06 06:29:28 -0800 |
commit | 1a1d7648d3e338b756e464cebb2ae1a815359afa (patch) | |
tree | defa2de6d2cb61efd95ef212eb3e89e1a5811032 /xfa/fxbarcode/oned/BC_OneDimWriter.cpp | |
parent | 7341149c634e0ab9a619898826440f6e952cf0aa (diff) | |
download | pdfium-1a1d7648d3e338b756e464cebb2ae1a815359afa.tar.xz |
Return unique_ptrs from CFX_DIBitmap::Clone().
Because that's what clone does. Perform immediate release
in some spots to avoid disrupting too much at once.
Review-Url: https://codereview.chromium.org/2534953004
Diffstat (limited to 'xfa/fxbarcode/oned/BC_OneDimWriter.cpp')
-rw-r--r-- | xfa/fxbarcode/oned/BC_OneDimWriter.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xfa/fxbarcode/oned/BC_OneDimWriter.cpp b/xfa/fxbarcode/oned/BC_OneDimWriter.cpp index 0555ba65fd..09f7aea9db 100644 --- a/xfa/fxbarcode/oned/BC_OneDimWriter.cpp +++ b/xfa/fxbarcode/oned/BC_OneDimWriter.cpp @@ -343,9 +343,10 @@ void CBC_OneDimWriter::RenderBitmapResult(CFX_DIBitmap*& pOutBitmap, e); BC_EXCEPTION_CHECK_ReturnVoid(e); } - CFX_DIBitmap* pStretchBitmap = pOutBitmap->StretchTo(m_Width, m_Height); + std::unique_ptr<CFX_DIBitmap> pStretchBitmap = + pOutBitmap->StretchTo(m_Width, m_Height); delete pOutBitmap; - pOutBitmap = pStretchBitmap; + pOutBitmap = pStretchBitmap.release(); } void CBC_OneDimWriter::RenderDeviceResult(CFX_RenderDevice* device, |