From 3a74745367a73ed9351379fc32bbe9253cdae697 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 24 Feb 2017 14:09:52 +0000 Subject: vector::data seems more natural than &vector::front Change-Id: I0ce48075ad186cf1f9bd3e13fa76269fa9819af1 --- include/oox/helper/binaryinputstream.hxx | 2 +- include/oox/helper/containerhelper.hxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/oox/helper/binaryinputstream.hxx b/include/oox/helper/binaryinputstream.hxx index bbc2550cb2c6..d83b8c9eb1fc 100644 --- a/include/oox/helper/binaryinputstream.hxx +++ b/include/oox/helper/binaryinputstream.hxx @@ -242,7 +242,7 @@ template< typename Type > sal_Int32 BinaryInputStream::readArray( ::std::vector< Type >& orVector, sal_Int32 nElemCount ) { orVector.resize( static_cast< size_t >( nElemCount ) ); - return orVector.empty() ? 0 : readArray( &orVector.front(), nElemCount ); + return orVector.empty() ? 0 : readArray(orVector.data(), nElemCount); } diff --git a/include/oox/helper/containerhelper.hxx b/include/oox/helper/containerhelper.hxx index 9c0632a53aa0..a5cd96615183 100644 --- a/include/oox/helper/containerhelper.hxx +++ b/include/oox/helper/containerhelper.hxx @@ -293,7 +293,7 @@ template< typename VectorType > typedef typename VectorType::value_type ValueType; if( rVector.empty() ) return css::uno::Sequence< ValueType >(); - return css::uno::Sequence< ValueType >( &rVector.front(), static_cast< sal_Int32 >( rVector.size() ) ); + return css::uno::Sequence(rVector.data(), static_cast(rVector.size())); } template< typename MatrixType > -- cgit