diff options
author | jsala <javier.salamanca.munoz@gmail.com> | 2022-06-25 13:34:32 +0200 |
---|---|---|
committer | Hossein <hossein@libreoffice.org> | 2022-11-06 01:25:32 +0100 |
commit | 64469bb1a7383da6e7ff1150d693b3e08f54bc91 (patch) | |
tree | 49d74f1630a38805ec0adda1f4bc4d631e06a38f /ure | |
parent | 04a58d7eae2b26559efd48ff7cdd23cec1c2187c (diff) |
tdf#145538 Use range based for loops
Change-Id: Ic27ef946b8b878770446bd975b836d7c6c29dd4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141668
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
Diffstat (limited to 'ure')
-rw-r--r-- | ure/source/uretest/cppmain.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/ure/source/uretest/cppmain.cc b/ure/source/uretest/cppmain.cc index fb957d9f221a..1acdad0a7811 100644 --- a/ure/source/uretest/cppmain.cc +++ b/ure/source/uretest/cppmain.cc @@ -17,7 +17,6 @@ */ #include "sal/config.h" -#include "sal/macros.h" #include <cstddef> #include <memory> @@ -120,8 +119,9 @@ private: "com.sun.star.script.InvocationAdapterFactory", "com.sun.star.uri.UriSchemeParser_vndDOTsunDOTstarDOTscript" }; - for (::std::size_t i = 0; i < SAL_N_ELEMENTS(services); ++i) { - ::rtl::OUString name(::rtl::OUString::createFromAscii(services[i])); + for (auto const & service : services) + { + ::rtl::OUString name(::rtl::OUString::createFromAscii(service)); css::uno::Reference< css::uno::XInterface > instance; try { instance = context_->getServiceManager()->createInstanceWithContext( @@ -165,10 +165,11 @@ private: static char const * const singletons[] = { "com.sun.star.reflection.theTypeDescriptionManager" }; - for (std::size_t i = 0; i != SAL_N_ELEMENTS(singletons); ++i) { + for (auto const & singleton : singletons) + { css::uno::Reference< css::uno::XInterface > instance( context_->getValueByName( - "/singletons/" + rtl::OUString::createFromAscii(singletons[i])), + "/singletons/" + rtl::OUString::createFromAscii(singleton)), css::uno::UNO_QUERY_THROW); } css::util::theMacroExpander::get(context_); |