summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2017-06-04 13:43:12 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-04 20:42:45 +0200
commit8511ee5cd11a5143a4476c0152f0ede0f2b6b87e (patch)
treec91b057fd2f08875a04d45c0cb5c2fd8f029a04f /vcl
parentc4ac732d8132b36b3817e65d2651599ebe16a7f2 (diff)
no need to construct unique_ptr here
and std::move is not needed when returning unique_ptr Change-Id: I9b4d2d6b8a41b570a9bd99e44a743ff161b78c59 Reviewed-on: https://gerrit.libreoffice.org/38385 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/filter/graphicfilter.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 495d85d6b8c9..e148287038f7 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -1439,7 +1439,7 @@ void GraphicFilter::ImportGraphics(std::vector< std::shared_ptr<Graphic> >& rGra
{
try
{
- pGraphicContent = std::unique_ptr<sal_uInt8[]>(new sal_uInt8[nGraphicContentSize]);
+ pGraphicContent.reset(new sal_uInt8[nGraphicContentSize]);
}
catch (const std::bad_alloc&)
{
@@ -1606,7 +1606,7 @@ ErrCode GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPath,
const std::vector<sal_uInt8>& rData = aIter->aData;
nGraphicContentSize = nChunkSize - 11;
SvMemoryStream aIStrm(const_cast<sal_uInt8*>(&rData[11]), nGraphicContentSize, StreamMode::READ);
- pGraphicContent = std::unique_ptr<sal_uInt8[]>(new sal_uInt8[nGraphicContentSize]);
+ pGraphicContent.reset(new sal_uInt8[nGraphicContentSize]);
sal_uInt64 aCurrentPosition = aIStrm.Tell();
aIStrm.ReadBytes(pGraphicContent.get(), nGraphicContentSize);
aIStrm.Seek(aCurrentPosition);
@@ -1690,7 +1690,7 @@ ErrCode GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPath,
// Make a uncompressed copy for GfxLink
nGraphicContentSize = nMemoryLength;
- pGraphicContent = std::unique_ptr<sal_uInt8[]>(new sal_uInt8[nGraphicContentSize]);
+ pGraphicContent.reset(new sal_uInt8[nGraphicContentSize]);
std::copy(aNewData.begin(), aNewData.end(), pGraphicContent.get());
if(!aMemStream.GetError() )
@@ -1911,7 +1911,7 @@ ErrCode GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPath,
{
try
{
- pGraphicContent = std::unique_ptr<sal_uInt8[]>(new sal_uInt8[nGraphicContentSize]);
+ pGraphicContent.reset(new sal_uInt8[nGraphicContentSize]);
}
catch (const std::bad_alloc&)
{