diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2018-09-15 17:24:55 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-19 08:46:02 +0200 |
commit | 4b4ad80908d8f583a32e5b9aa61a95f01ecdbfda (patch) | |
tree | 00b398ca44010488c3a1e650b20846cad1ee091f /vcl/osx/salprn.cxx | |
parent | cde84694f094a317e3bb57aaaf244b0363ef5cc5 (diff) |
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/osx/salprn.cxx')
-rw-r--r-- | vcl/osx/salprn.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
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<sal_uInt8*>(std::malloc(nWidth * 4 * nHeight)), - &std::free); + mpContextMemory.reset(new (std::nothrow) sal_uInt8[nWidth * 4 * nHeight]); if (mpContextMemory) { |