From 40c9ebbb6fbba3fbb70ae652acd53928d8f26803 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 23 Jun 2017 10:10:20 +0100 Subject: convert to std::vector Change-Id: I37a866f4248ad6441cb73b826c13b3602b96e03a --- vcl/source/filter/sgvmain.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'vcl') diff --git a/vcl/source/filter/sgvmain.cxx b/vcl/source/filter/sgvmain.cxx index 35cade1d954a..63d756aaf5ef 100644 --- a/vcl/source/filter/sgvmain.cxx +++ b/vcl/source/filter/sgvmain.cxx @@ -782,11 +782,11 @@ void DrawObjkList( SvStream& rInp, OutputDevice& rOut ) SAL_WARN("vcl", "file is shorter than requested len"); nSize = nRemainingSize; } - UCHAR *pBuffer = new UCHAR[nSize+1]; // add one for LookAhead at CK-separation - size_t nReadSize = rInp.ReadBytes(pBuffer, nSize); - pBuffer[nReadSize] = 0; - if (!rInp.GetError() && nReadSize == aText.BufSize) aText.Draw(rOut, pBuffer); - delete[] pBuffer; + std::vector aBuffer(nSize+1); // add one for LookAhead at CK-separation + size_t nReadSize = rInp.ReadBytes(aBuffer.data(), nSize); + aBuffer[nReadSize] = 0; + if (!rInp.GetError() && nReadSize == aText.BufSize) + aText.Draw(rOut, aBuffer.data()); } } break; case ObjBmap: { -- cgit v1.2.3