From e6ab01ce532d1db01579b70bd476b2f643522bf9 Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Sat, 23 Nov 2019 18:54:42 +0100 Subject: cppcheck: performing init in init list (sfx2/slideshow/stoc/store) Change-Id: Iddbd3256aabe9552472b55d3d9b88a3769698de9 Reviewed-on: https://gerrit.libreoffice.org/83576 Reviewed-by: Julien Nabet Tested-by: Julien Nabet --- stoc/source/defaultregistry/defaultregistry.cxx | 7 +------ stoc/source/inspect/introspection.cxx | 6 ++---- stoc/source/invocation_adapterfactory/iafactory.cxx | 8 +++----- 3 files changed, 6 insertions(+), 15 deletions(-) (limited to 'stoc/source') diff --git a/stoc/source/defaultregistry/defaultregistry.cxx b/stoc/source/defaultregistry/defaultregistry.cxx index f0a4d0ff18a3..aff6a5f1113c 100644 --- a/stoc/source/defaultregistry/defaultregistry.cxx +++ b/stoc/source/defaultregistry/defaultregistry.cxx @@ -137,11 +137,8 @@ protected: NestedKeyImpl::NestedKeyImpl( NestedRegistryImpl* pDefaultRegistry, Reference& localKey, Reference& defaultKey ) - : m_xRegistry(pDefaultRegistry) + : m_state(m_xRegistry->m_state), m_xRegistry(pDefaultRegistry), m_localKey(localKey), m_defaultKey(defaultKey) { - m_localKey = localKey; - m_defaultKey = defaultKey; - if (m_localKey.is()) { m_name = m_localKey->getKeyName(); @@ -150,8 +147,6 @@ NestedKeyImpl::NestedKeyImpl( NestedRegistryImpl* pDefaultRegistry, { m_name = m_defaultKey->getKeyName(); } - - m_state = m_xRegistry->m_state; } diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx index 58434b2f51ea..14ecf79af050 100644 --- a/stoc/source/inspect/introspection.cxx +++ b/stoc/source/inspect/introspection.cxx @@ -773,13 +773,11 @@ public: ImplIntrospectionAccess::ImplIntrospectionAccess ( const Any& obj, rtl::Reference< IntrospectionAccessStatic_Impl > const & pStaticImpl_ ) - : maInspectedObject( obj ), mpStaticImpl( pStaticImpl_ ) //, maAdapter() + : maInspectedObject( obj ), mpStaticImpl( pStaticImpl_ ) , + mnLastPropertyConcept(-1), mnLastMethodConcept(-1) //, maAdapter() { // Save object as an interface if possible maInspectedObject >>= mxIface; - - mnLastPropertyConcept = -1; - mnLastMethodConcept = -1; } Reference ImplIntrospectionAccess::getXElementAccess() diff --git a/stoc/source/invocation_adapterfactory/iafactory.cxx b/stoc/source/invocation_adapterfactory/iafactory.cxx index 4aecc1899c69..b1c654760b73 100644 --- a/stoc/source/invocation_adapterfactory/iafactory.cxx +++ b/stoc/source/invocation_adapterfactory/iafactory.cxx @@ -678,7 +678,9 @@ AdapterImpl::AdapterImpl( FactoryImpl::FactoryImpl( Reference< XComponentContext > const & xContext ) - : m_pInvokMethodTD( nullptr ), + : m_aUno2Cpp(Mapping( UNO_LB_UNO, CPPU_CURRENT_LANGUAGE_BINDING_NAME )), + m_aCpp2Uno(Mapping( CPPU_CURRENT_LANGUAGE_BINDING_NAME, UNO_LB_UNO)), + m_pInvokMethodTD( nullptr ), m_pSetValueTD( nullptr ), m_pGetValueTD( nullptr ), m_pAnySeqTD( nullptr ), @@ -686,10 +688,6 @@ FactoryImpl::FactoryImpl( Reference< XComponentContext > const & xContext ) m_pConvertToTD( nullptr ) { // C++/UNO bridge - OUString aCppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; - OUString aUnoEnvTypeName = UNO_LB_UNO; - m_aUno2Cpp = Mapping( aUnoEnvTypeName, aCppEnvTypeName ); - m_aCpp2Uno = Mapping( aCppEnvTypeName, aUnoEnvTypeName ); OSL_ENSURE( m_aUno2Cpp.is() && m_aCpp2Uno.is(), "### no uno / C++ mappings!" ); -- cgit