From 4b4ad80908d8f583a32e5b9aa61a95f01ecdbfda Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sat, 15 Sep 2018 17:24:55 +0200 Subject: std::shared_ptr in AquaSalInfoPrinter can be std::unique_ptr also simplify the the call to reset Change-Id: Ie29b5ef754a8caf905e2dddbb56d8f1ffc7a43a0 Reviewed-on: https://gerrit.libreoffice.org/60698 Tested-by: Jenkins Reviewed-by: Noel Grandin --- vcl/osx/salprn.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'vcl/osx/salprn.cxx') diff --git a/vcl/osx/salprn.cxx b/vcl/osx/salprn.cxx index c3d8e52fccd9..7fdd072e836f 100644 --- a/vcl/osx/salprn.cxx +++ b/vcl/osx/salprn.cxx @@ -71,8 +71,7 @@ AquaSalInfoPrinter::AquaSalInfoPrinter( const SalPrinterQueueInfo& i_rQueue ) : mpGraphics = new AquaSalGraphics(); const int nWidth = 100, nHeight = 100; - mpContextMemory.reset(static_cast(std::malloc(nWidth * 4 * nHeight)), - &std::free); + mpContextMemory.reset(new (std::nothrow) sal_uInt8[nWidth * 4 * nHeight]); if (mpContextMemory) { -- cgit