cppuhelper/source/defaultbootstrap.cxx | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-)
New commits: commit fd29369a9ddb1e4a277cba90384ecf5ee2de450c Author: Julien Nabet <serval2...@yahoo.fr> AuthorDate: Fri Oct 15 16:32:08 2021 +0200 Commit: Julien Nabet <serval2...@yahoo.fr> CommitDate: Fri Oct 15 20:27:38 2021 +0200 Simplify vector initialization in cppuhelper Change-Id: I1c1e36932673fe26fdd9daf21925fb952dbbfa73 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123663 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2...@yahoo.fr> diff --git a/cppuhelper/source/defaultbootstrap.cxx b/cppuhelper/source/defaultbootstrap.cxx index e48b3ea67bc1..6e80c9697158 100644 --- a/cppuhelper/source/defaultbootstrap.cxx +++ b/cppuhelper/source/defaultbootstrap.cxx @@ -57,27 +57,26 @@ cppu::defaultBootstrap_InitialComponentContext(OUString const & iniUri) smgr->init(getBootstrapVariable(bs, "UNO_SERVICES")); rtl::Reference tmgr(new cppuhelper::TypeManager); tmgr->init(getBootstrapVariable(bs, "UNO_TYPES")); - std::vector< cppu::ContextEntry_Init > context_values; - context_values.push_back( + std::vector< cppu::ContextEntry_Init > context_values + { cppu::ContextEntry_Init( "/singletons/com.sun.star.lang.theServiceManager", css::uno::Any( css::uno::Reference< css::uno::XInterface >( static_cast< cppu::OWeakObject * >(smgr.get()))), - false)); - context_values.push_back( + false), cppu::ContextEntry_Init( "/singletons/com.sun.star.reflection.theTypeDescriptionManager", css::uno::Any( css::uno::Reference< css::uno::XInterface >( static_cast< cppu::OWeakObject * >(tmgr.get()))), - false)); - context_values.push_back( //TODO: from services.rdb? - cppu::ContextEntry_Init( + false), + cppu::ContextEntry_Init( //TODO: from services.rdb? "/singletons/com.sun.star.util.theMacroExpander", css::uno::Any( cppuhelper::detail::create_bootstrap_macro_expander_factory()), - true)); + true) + }; smgr->addSingletonContextEntries(&context_values); context_values.push_back( cppu::ContextEntry_Init(