From 66343a8aeb4328a61766e4df41515130290e8a93 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 30 Sep 2015 10:17:20 +0100 Subject: shared_array->unique_ptr<[]> where we don't need to share the data Change-Id: I0edc9d62186d96095ee67e3c93f5cf186dffcb71 --- include/oox/helper/binaryoutputstream.hxx | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'include') diff --git a/include/oox/helper/binaryoutputstream.hxx b/include/oox/helper/binaryoutputstream.hxx index 49eb7e7e1cc1..bcceec379ffa 100644 --- a/include/oox/helper/binaryoutputstream.hxx +++ b/include/oox/helper/binaryoutputstream.hxx @@ -20,10 +20,8 @@ #ifndef INCLUDED_OOX_HELPER_BINARYOUTPUTSTREAM_HXX #define INCLUDED_OOX_HELPER_BINARYOUTPUTSTREAM_HXX -#include -#include - #include +#include namespace com { namespace sun { namespace star { namespace io { class XOutputStream; } @@ -103,14 +101,11 @@ void BinaryOutputStream::writeArray( Type* opnArray, sal_Int32 nElemCount ) template< typename Type > void BinaryOutputStream::writeArray( const Type* opnArray, sal_Int32 nElemCount ) { - boost::shared_array pArray(new Type[nElemCount]); - std::uninitialized_copy(opnArray, opnArray + nElemCount, pArray.get()); - writeArray(pArray.get(), nElemCount); + std::unique_ptr xArray(new Type[nElemCount]); + std::uninitialized_copy(opnArray, opnArray + nElemCount, xArray.get()); + writeArray(xArray.get(), nElemCount); } - - - template< typename Type > void BinaryOutputStream::writeValue( Type nValue ) { -- cgit