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>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user