From 81610561edfb8c899a062cc09fc1a80e8098577f Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 3 Jun 2015 15:16:19 +0200 Subject: uno::Sequence provides now begin and end use begin() and end() when calling std::copy on an uno::Sequence Inspired by commit b34b648fc3262c5d9aa295f621e8fe9c97d4c6b2 "uno::Sequence provides now begin and end" Change-Id: I08e8c3fd6144e77b95a26f85bc0daf6a9edeeb0b Reviewed-on: https://gerrit.libreoffice.org/16057 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- include/comphelper/sequence.hxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/comphelper') diff --git a/include/comphelper/sequence.hxx b/include/comphelper/sequence.hxx index fcaab6b48c78..03b7feabcb91 100644 --- a/include/comphelper/sequence.hxx +++ b/include/comphelper/sequence.hxx @@ -256,7 +256,7 @@ namespace comphelper template < typename DstType, typename SrcType > inline DstType* sequenceToArray( DstType* io_pArray, const ::com::sun::star::uno::Sequence< SrcType >& i_Sequence ) { - ::std::copy( i_Sequence.getConstArray(), i_Sequence.getConstArray()+i_Sequence.getLength(), io_pArray ); + ::std::copy( i_Sequence.begin(), i_Sequence.end(), io_pArray ); return io_pArray; } @@ -327,7 +327,7 @@ namespace comphelper inline DstType sequenceToContainer( const ::com::sun::star::uno::Sequence< SrcType >& i_Sequence ) { DstType result( i_Sequence.getLength() ); - ::std::copy( i_Sequence.getConstArray(), i_Sequence.getConstArray()+i_Sequence.getLength(), result.begin() ); + ::std::copy( i_Sequence.begin(), i_Sequence.end(), result.begin() ); return result; } @@ -365,7 +365,7 @@ namespace comphelper inline DstType& sequenceToContainer( DstType& o_Output, const ::com::sun::star::uno::Sequence< SrcType >& i_Sequence ) { o_Output.resize( i_Sequence.getLength() ); - ::std::copy( i_Sequence.getConstArray(), i_Sequence.getConstArray()+i_Sequence.getLength(), o_Output.begin() ); + ::std::copy( i_Sequence.begin(), i_Sequence.end(), o_Output.begin() ); return o_Output; } -- cgit