Clean up C-style casts from pointers to void

Change-Id: I156cbb51efe9346af88fb82a648fa09715d299a5
This commit is contained in:
Stephan Bergmann
2015-03-28 19:06:15 +01:00
parent 77d1a61c95
commit 8dee9e90f7
2 changed files with 4 additions and 4 deletions

View File

@@ -1139,7 +1139,7 @@ OUString SAL_CALL AnalysisAddIn::getComplex( double fR, double fI, const uno::An
break; break;
case uno::TypeClass_STRING: case uno::TypeClass_STRING:
{ {
const OUString* pSuff = ( const OUString* ) rSuff.getValue(); const OUString* pSuff = static_cast<const OUString*>(rSuff.getValue());
bi = *pSuff == "i" || pSuff->isEmpty(); bi = *pSuff == "i" || pSuff->isEmpty();
if( !bi && *pSuff != "j" ) if( !bi && *pSuff != "j" )
throw lang::IllegalArgumentException(); throw lang::IllegalArgumentException();

View File

@@ -2153,10 +2153,10 @@ void ComplexList::Append( const uno::Sequence< uno::Any >& aMultPars, ComplListA
case uno::TypeClass_VOID: break; case uno::TypeClass_VOID: break;
case uno::TypeClass_STRING: case uno::TypeClass_STRING:
{ {
const OUString* pStr = ( const OUString* ) r.getValue(); const OUString* pStr = static_cast<const OUString*>(r.getValue());
if( !pStr->isEmpty() ) if( !pStr->isEmpty() )
Append( new Complex( *( OUString* ) r.getValue() ) ); Append( new Complex( *static_cast<OUString const *>(r.getValue()) ) );
else if( bEmpty0 ) else if( bEmpty0 )
Append( new Complex( 0.0 ) ); Append( new Complex( 0.0 ) );
else if( bErrOnEmpty ) else if( bErrOnEmpty )
@@ -2164,7 +2164,7 @@ void ComplexList::Append( const uno::Sequence< uno::Any >& aMultPars, ComplListA
} }
break; break;
case uno::TypeClass_DOUBLE: case uno::TypeClass_DOUBLE:
Append( new Complex( *( double* ) r.getValue(), 0.0 ) ); Append( new Complex( *static_cast<double const *>(r.getValue()), 0.0 ) );
break; break;
case uno::TypeClass_SEQUENCE: case uno::TypeClass_SEQUENCE:
{ {