From 281e5f982008741bb6f7f03c578e47e342f4543e Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 19 Oct 2018 10:14:47 +0100 Subject: new/delete mismatch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I910366753d1d365e0388262c98fca12d000e83e5 Reviewed-on: https://gerrit.libreoffice.org/61979 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- canvas/source/directx/dx_impltools.cxx | 2 +- canvas/source/directx/dx_vcltools.cxx | 6 +++--- canvas/source/directx/dx_vcltools.hxx | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'canvas') diff --git a/canvas/source/directx/dx_impltools.cxx b/canvas/source/directx/dx_impltools.cxx index ea235cfe08de..27fc270f94c7 100644 --- a/canvas/source/directx/dx_impltools.cxx +++ b/canvas/source/directx/dx_impltools.cxx @@ -504,7 +504,7 @@ namespace dxcanvas aBmpData.Height = rRawRGBAData.mnHeight; aBmpData.Stride = 4*aBmpData.Width; // bottom-up format aBmpData.PixelFormat = PixelFormat32bppARGB; - aBmpData.Scan0 = rRawRGBAData.mpBitmapData.get(); + aBmpData.Scan0 = const_cast(rRawRGBAData.maBitmapData.data()); const Gdiplus::Rect aRect( 0,0,aBmpData.Width,aBmpData.Height ); if( Gdiplus::Ok != pBitmap->LockBits( &aRect, diff --git a/canvas/source/directx/dx_vcltools.cxx b/canvas/source/directx/dx_vcltools.cxx index b8e511a09260..07a71b330ae9 100644 --- a/canvas/source/directx/dx_vcltools.cxx +++ b/canvas/source/directx/dx_vcltools.cxx @@ -155,7 +155,7 @@ namespace dxcanvas RawRGBABitmap aBmpData; aBmpData.mnWidth = aBmpSize.Width(); aBmpData.mnHeight = aBmpSize.Height(); - aBmpData.mpBitmapData.reset( new sal_uInt8[ 4*aBmpData.mnWidth*aBmpData.mnHeight ] ); + aBmpData.maBitmapData.resize(4*aBmpData.mnWidth*aBmpData.mnHeight); Bitmap aBitmap( rBmpEx.GetBitmap() ); @@ -200,7 +200,7 @@ namespace dxcanvas "Unsupported alpha scanline format" ); BitmapColor aCol; - sal_uInt8* pCurrOutput( aBmpData.mpBitmapData.get() ); + sal_uInt8* pCurrOutput(aBmpData.maBitmapData.data()); int x, y; for( y=0; y mpBitmapData; + std::vector maBitmapData; }; bool drawVCLBitmapFromXBitmap( const std::shared_ptr< Gdiplus::Graphics >& rGraphics, -- cgit v1.2.3