From ea9367037232054a576f1e6aabffeb3a62ffa44b Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Mon, 29 Apr 2024 01:31:19 +0500 Subject: Drop some uses of css::uno::Sequence::getConstArray ... where it was obsoleted by commits 2484de6728bd11bb7949003d112f1ece2223c7a1 (Remove non-const Sequence::begin()/end() in internal code, 2021-10-15) and fb3c04bd1930eedacd406874e1a285d62bbf27d9 (Drop non-const Sequence::operator[] in internal code 2021-11-05). Change-Id: I4ccc647bb794515c8c11f8dfd9a26563f4aa094b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166819 Reviewed-by: Mike Kaganski Tested-by: Jenkins --- include/comphelper/namedvaluecollection.hxx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/comphelper/namedvaluecollection.hxx b/include/comphelper/namedvaluecollection.hxx index b92646e40a11..aa30df9932b4 100644 --- a/include/comphelper/namedvaluecollection.hxx +++ b/include/comphelper/namedvaluecollection.hxx @@ -302,12 +302,8 @@ namespace comphelper css::uno::Sequence< VALUE_TYPE > aValues; *this >>= aValues; css::uno::Sequence< css::uno::Any > aWrappedValues( aValues.getLength() ); - - css::uno::Any* pO = aWrappedValues.getArray(); - const VALUE_TYPE* pV = aValues.getConstArray(); - const sal_Int32 nLen = aValues.getLength(); - for( sal_Int32 i = 0; i < nLen; ++i ) - *(pO++) = css::uno::Any( *(pV++) ); + std::transform(aValues.begin(), aValues.end(), aWrappedValues.getArray(), + [](const auto& val) { return css::uno::Any(val); }); return aWrappedValues; } -- cgit