Chromium Code Reviews| Index: xfa/fxbarcode/BC_TwoDimWriter.cpp |
| diff --git a/xfa/fxbarcode/BC_TwoDimWriter.cpp b/xfa/fxbarcode/BC_TwoDimWriter.cpp |
| index 83b7b3c0816bab4c5ffc7b667237c701cefed4d9..ec6c3626b2a574a84fc3f8323692937e21e8b31f 100644 |
| --- a/xfa/fxbarcode/BC_TwoDimWriter.cpp |
| +++ b/xfa/fxbarcode/BC_TwoDimWriter.cpp |
| @@ -82,9 +82,10 @@ void CBC_TwoDimWriter::RenderBitmapResult(CFX_DIBitmap*& pOutBitmap, |
| } |
| } |
| if (!m_bFixedSize) { |
| - 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(); |
|
dsinclair
2016/12/05 20:41:26
can pOutBitmap be a unique_ptr& instead of a *&?
Tom Sepez
2016/12/05 21:38:13
Yes, but it ripples through a lot of places so I l
|
| } |
| } |