diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2021-10-15 16:32:08 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2021-10-15 20:27:38 +0200 |
commit | fd29369a9ddb1e4a277cba90384ecf5ee2de450c (patch) | |
tree | b9e4a09e1ea813e3674cff9fe980668b0a8c06a9 /cppuhelper | |
parent | 094babdf63bff535a692f23971ddf0a77424bdd1 (diff) |
Simplify vector initialization in cppuhelper
Change-Id: I1c1e36932673fe26fdd9daf21925fb952dbbfa73
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123663
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'cppuhelper')
-rw-r--r-- | cppuhelper/source/defaultbootstrap.cxx | 15 |
1 files changed, 7 insertions, 8 deletions
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( |