loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I1ceb4359188b61e15a31750a496021c4394e1a3f
This commit is contained in:
@@ -150,7 +150,7 @@ Sequence< OUString > SAL_CALL AnyCompareFactory::getSupportedServiceNames_static
|
||||
Reference< XInterface > SAL_CALL AnyCompareFactory::Create(
|
||||
const Reference< XComponentContext >& rxContext )
|
||||
{
|
||||
return (cppu::OWeakObject*)new AnyCompareFactory( rxContext );
|
||||
return static_cast<cppu::OWeakObject*>(new AnyCompareFactory( rxContext ));
|
||||
}
|
||||
|
||||
void createRegistryInfo_AnyCompareFactory()
|
||||
|
@@ -247,7 +247,7 @@ sal_Bool SAL_CALL IndexedPropertyValuesContainer::supportsService( const OUStrin
|
||||
uno::Reference< uno::XInterface > SAL_CALL IndexedPropertyValuesContainer::Create(
|
||||
SAL_UNUSED_PARAMETER const uno::Reference< uno::XComponentContext >&)
|
||||
{
|
||||
return (cppu::OWeakObject*)new IndexedPropertyValuesContainer();
|
||||
return static_cast<cppu::OWeakObject*>(new IndexedPropertyValuesContainer());
|
||||
}
|
||||
|
||||
void createRegistryInfo_IndexedPropertyValuesContainer()
|
||||
|
@@ -216,7 +216,7 @@ sal_Bool SAL_CALL NamedPropertyValuesContainer::supportsService( const OUString&
|
||||
uno::Reference< uno::XInterface > SAL_CALL NamedPropertyValuesContainer::Create(
|
||||
SAL_UNUSED_PARAMETER const uno::Reference< uno::XComponentContext >&)
|
||||
{
|
||||
return (cppu::OWeakObject*)new NamedPropertyValuesContainer();
|
||||
return static_cast<cppu::OWeakObject*>(new NamedPropertyValuesContainer());
|
||||
}
|
||||
|
||||
void createRegistryInfo_NamedPropertyValuesContainer()
|
||||
|
@@ -199,7 +199,7 @@ Type SAL_CALL NameContainer::getElementType()
|
||||
|
||||
Reference< XNameContainer > comphelper::NameContainer_createInstance( Type aType )
|
||||
{
|
||||
return (XNameContainer*) new NameContainer( aType );
|
||||
return static_cast<XNameContainer*>(new NameContainer( aType ));
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@@ -185,7 +185,7 @@ void SAL_CALL AttacherAllListener_Impl::firing(const AllEventObject& Event)
|
||||
throw( RuntimeException, std::exception )
|
||||
{
|
||||
ScriptEvent aScriptEvent;
|
||||
aScriptEvent.Source = (OWeakObject *)mpManager; // get correct XInterface
|
||||
aScriptEvent.Source = static_cast<OWeakObject *>(mpManager); // get correct XInterface
|
||||
aScriptEvent.ListenerType = Event.ListenerType;
|
||||
aScriptEvent.MethodName = Event.MethodName;
|
||||
aScriptEvent.Arguments = Event.Arguments;
|
||||
@@ -250,7 +250,7 @@ Any SAL_CALL AttacherAllListener_Impl::approveFiring( const AllEventObject& Even
|
||||
throw( InvocationTargetException, RuntimeException, std::exception )
|
||||
{
|
||||
ScriptEvent aScriptEvent;
|
||||
aScriptEvent.Source = (OWeakObject *)mpManager; // get correct XInterface
|
||||
aScriptEvent.Source = static_cast<OWeakObject *>(mpManager); // get correct XInterface
|
||||
aScriptEvent.ListenerType = Event.ListenerType;
|
||||
aScriptEvent.MethodName = Event.MethodName;
|
||||
aScriptEvent.Arguments = Event.Arguments;
|
||||
|
@@ -265,7 +265,7 @@ Sequence< OUString > SAL_CALL GenericPropertySet::getSupportedServiceNames( )
|
||||
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > comphelper::GenericPropertySet_CreateInstance( comphelper::PropertySetInfo* pInfo )
|
||||
{
|
||||
return (XPropertySet*)new GenericPropertySet( pInfo );
|
||||
return static_cast<XPropertySet*>(new GenericPropertySet( pInfo ));
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@@ -115,7 +115,7 @@ sal_Int32 SAL_CALL UNOMemoryStream::readBytes( Sequence< sal_Int8 >& aData, sal_
|
||||
{
|
||||
sal_Int8* pData = static_cast<sal_Int8*>(&(*maData.begin()));
|
||||
sal_Int8* pCursor = &((pData)[mnCursor]);
|
||||
memcpy( (void*)aData.getArray(), (void*)pCursor, nBytesToRead );
|
||||
memcpy( static_cast<void*>(aData.getArray()), static_cast<void*>(pCursor), nBytesToRead );
|
||||
|
||||
mnCursor += nBytesToRead;
|
||||
}
|
||||
@@ -190,7 +190,7 @@ void SAL_CALL UNOMemoryStream::writeBytes( const Sequence< sal_Int8 >& aData ) t
|
||||
|
||||
sal_Int8* pData = static_cast<sal_Int8*>(&(*maData.begin()));
|
||||
sal_Int8* pCursor = &(pData[mnCursor]);
|
||||
memcpy( (void*)pCursor, (void*)aData.getConstArray(), nBytesToWrite );
|
||||
memcpy( pCursor, aData.getConstArray(), nBytesToWrite );
|
||||
|
||||
mnCursor += nBytesToWrite;
|
||||
}
|
||||
|
@@ -51,7 +51,7 @@ sal_Int32 SAL_CALL OSLInputStreamWrapper::readBytes(css::uno::Sequence< sal_Int8
|
||||
aData.realloc(nBytesToRead);
|
||||
|
||||
sal_uInt64 nRead = 0;
|
||||
FileBase::RC eError = m_pFile->read((void*)aData.getArray(), nBytesToRead, nRead);
|
||||
FileBase::RC eError = m_pFile->read(static_cast<void*>(aData.getArray()), nBytesToRead, nRead);
|
||||
if (eError != FileBase::E_None)
|
||||
throw css::io::BufferSizeExceededException(OUString(),static_cast<css::uno::XWeak*>(this));
|
||||
|
||||
|
Reference in New Issue
Block a user