include/comphelper/sequence.hxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
New commits: commit f0d3a9bb00e11ca697666dd4e6f9c4dea38c7b31 Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Mon Jun 19 10:02:50 2017 +0200 simplify the array version of comphelper::containerToSequence Change-Id: I85c0baa32b37201fc2caaa4e5bd390e060241265 Reviewed-on: https://gerrit.libreoffice.org/38951 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/include/comphelper/sequence.hxx b/include/comphelper/sequence.hxx index 8fba7b8722b1..26d08c993c1e 100644 --- a/include/comphelper/sequence.hxx +++ b/include/comphelper/sequence.hxx @@ -301,12 +301,10 @@ namespace comphelper } // handle arrays - template<typename SrcElementType, std::size_t SrcSize> - inline css::uno::Sequence< SrcElementType > containerToSequence( SrcElementType const (&i_Array)[ SrcSize ] ) + template<typename ElementType, std::size_t SrcSize> + inline css::uno::Sequence< ElementType > containerToSequence( ElementType const (&i_Array)[ SrcSize ] ) { - css::uno::Sequence< SrcElementType > result( SrcSize ); - ::std::copy( std::begin(i_Array), std::end(i_Array), result.getArray() ); - return result; + return css::uno::Sequence< ElementType >( i_Array, SrcSize ); } template <typename T> _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits