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:
Mike Kaganski
2019-02-11 09:02:13 +03:00
parent 294b9a4159
commit cfbd830e9c
13 changed files with 43 additions and 57 deletions

View File

@@ -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);
}
}
}

View File

@@ -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);
}
}
}

View File

@@ -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);
}
}