summaryrefslogtreecommitdiff
path: root/canvas
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-10-19 10:14:47 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-10-20 13:49:41 +0200
commit281e5f982008741bb6f7f03c578e47e342f4543e (patch)
tree3abfad3161178c7313006154bba6b125de4bdea9 /canvas
parent7f0b7410e84a222d8fbee7c4fadd3b40028a068d (diff)
new/delete mismatch
Change-Id: I910366753d1d365e0388262c98fca12d000e83e5 Reviewed-on: https://gerrit.libreoffice.org/61979 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'canvas')
-rw-r--r--canvas/source/directx/dx_impltools.cxx2
-rw-r--r--canvas/source/directx/dx_vcltools.cxx6
-rw-r--r--canvas/source/directx/dx_vcltools.hxx2
3 files changed, 5 insertions, 5 deletions
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<sal_uInt8*>(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<nHeight; ++y )
@@ -340,7 +340,7 @@ namespace dxcanvas
int nCurrBit;
const int nMask( 1 );
const int nInitialBit(7);
- sal_uInt8* pCurrOutput( aBmpData.mpBitmapData.get() );
+ sal_uInt8* pCurrOutput(aBmpData.maBitmapData.data());
int x, y;
// mapping table, to get from mask index color to
diff --git a/canvas/source/directx/dx_vcltools.hxx b/canvas/source/directx/dx_vcltools.hxx
index e3fb62269cac..8eb5ea90b2a4 100644
--- a/canvas/source/directx/dx_vcltools.hxx
+++ b/canvas/source/directx/dx_vcltools.hxx
@@ -37,7 +37,7 @@ namespace dxcanvas
{
sal_Int32 mnWidth;
sal_Int32 mnHeight;
- std::shared_ptr< sal_uInt8 > mpBitmapData;
+ std::vector<sal_uInt8> maBitmapData;
};
bool drawVCLBitmapFromXBitmap( const std::shared_ptr< Gdiplus::Graphics >& rGraphics,