summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-06-23 10:10:20 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-06-23 10:55:55 +0100
commit40c9ebbb6fbba3fbb70ae652acd53928d8f26803 (patch)
tree7dc51727d04e2548ed9b21e2e630a188972a2917
parentce45dcf8d7ae0b41e898850090cc2ad4fdc0bfd4 (diff)
convert to std::vector
Change-Id: I37a866f4248ad6441cb73b826c13b3602b96e03a
-rw-r--r--vcl/source/filter/sgvmain.cxx10
1 files changed, 5 insertions, 5 deletions
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<UCHAR> 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: {