diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-02-11 09:02:13 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-02-12 09:04:54 +0100 |
commit | cfbd830e9c4d1877989bc4ad93109551a0a4b0b7 (patch) | |
tree | a050319e1167c816ac284894de0c2d4a535ee23a /scripting/source | |
parent | 294b9a415929f25982373e91cba9254686074b19 (diff) |
tdf#120703 PVS: remove redundant static casts
V572 It is odd that the object which was created using 'new' operator
is immediately cast to another type.
Change-Id: I5fee1c4bebd1972fbb5e43da37149d4e2ff6ce0d
Reviewed-on: https://gerrit.libreoffice.org/67664
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'scripting/source')
-rw-r--r-- | scripting/source/basprov/baslibnode.cxx | 3 | ||||
-rw-r--r-- | scripting/source/basprov/basmodnode.cxx | 3 | ||||
-rw-r--r-- | scripting/source/basprov/basprov.cxx | 5 |
3 files changed, 7 insertions, 4 deletions
diff --git a/scripting/source/basprov/baslibnode.cxx b/scripting/source/basprov/baslibnode.cxx index 0ace13a90dc9..015334f97ae0 100644 --- a/scripting/source/basprov/baslibnode.cxx +++ b/scripting/source/basprov/baslibnode.cxx @@ -96,7 +96,8 @@ namespace basprov { SbModule* pModule = pBasic->FindModule( pNames[i] ); if ( pModule ) - aChildNodes[i] = static_cast< browse::XBrowseNode* >( new BasicModuleNodeImpl( m_xContext, m_sScriptingContext, pModule, m_bIsAppScript ) ); + aChildNodes[i] = new BasicModuleNodeImpl(m_xContext, m_sScriptingContext, + pModule, m_bIsAppScript); } } } diff --git a/scripting/source/basprov/basmodnode.cxx b/scripting/source/basprov/basmodnode.cxx index b44416a479a2..684d5b1c67b1 100644 --- a/scripting/source/basprov/basmodnode.cxx +++ b/scripting/source/basprov/basmodnode.cxx @@ -97,7 +97,8 @@ namespace basprov { SbMethod* pMethod = static_cast< SbMethod* >( pMethods->Get( static_cast< sal_uInt16 >( i ) ) ); if ( pMethod && !pMethod->IsHidden() ) - pChildNodes[iTarget++] = static_cast< browse::XBrowseNode* >( new BasicMethodNodeImpl( m_xContext, m_sScriptingContext, pMethod, m_bIsAppScript ) ); + pChildNodes[iTarget++] = new BasicMethodNodeImpl( + m_xContext, m_sScriptingContext, pMethod, m_bIsAppScript); } } } diff --git a/scripting/source/basprov/basprov.cxx b/scripting/source/basprov/basprov.cxx index 1055b57bd7d0..796b7ba391bd 100644 --- a/scripting/source/basprov/basprov.cxx +++ b/scripting/source/basprov/basprov.cxx @@ -448,8 +448,9 @@ namespace basprov } if ( bCreate ) { - pChildNodes[childrenFound++] = static_cast< browse::XBrowseNode* >( new BasicLibraryNodeImpl( - m_xContext, m_sScriptingContext, pBasicManager, xLibContainer, pLibNames[i], m_bIsAppScriptCtx ) ); + pChildNodes[childrenFound++] + = new BasicLibraryNodeImpl(m_xContext, m_sScriptingContext, pBasicManager, + xLibContainer, pLibNames[i], m_bIsAppScriptCtx); } } |