From 20571c472528c4f98fe3f55700d134915d32a49a Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 10 Jul 2017 16:12:07 +0200 Subject: use more range-for on uno::Sequence Change-Id: Ifad32425d79be5a22d33d721bdc5fb993f699759 Reviewed-on: https://gerrit.libreoffice.org/39763 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- cppuhelper/source/factory.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'cppuhelper') diff --git a/cppuhelper/source/factory.cxx b/cppuhelper/source/factory.cxx index 6b81ac0da090..649024f667d8 100644 --- a/cppuhelper/source/factory.cxx +++ b/cppuhelper/source/factory.cxx @@ -766,9 +766,8 @@ Sequence< OUString > ORegistryFactoryHelper::getSupportedServiceNames() // Full qualified names like "IMPLEMENTATIONS/TEST/UNO/SERVICES/com.sun.star..." Sequence seqKeys = xKey->getKeyNames(); - OUString* pKeys = seqKeys.getArray(); - for( sal_Int32 i = 0; i < seqKeys.getLength(); i++ ) - pKeys[i] = pKeys[i].copy(nPrefixLen); + for( OUString & key : seqKeys ) + key = key.copy(nPrefixLen); aServiceNames = seqKeys; } -- cgit