summaryrefslogtreecommitdiff
path: root/rsc/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-03-23 09:47:49 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-03-23 09:48:10 +0000
commited76d1d3504c92bff6bb3e6417e4440572fcd959 (patch)
tree6d06b4a20bef5acf0c1a4118685f09acdd27fbb7 /rsc/source
parenta61c4ae9cef23a53ea88f957e090bd5ee9b28ca6 (diff)
loplugins:redundantcast teach it about c-style typedef casts
Change-Id: I1ac11a2481c0f4d8be1e1fd7c7637ac0ece3d65c Reviewed-on: https://gerrit.libreoffice.org/35558 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'rsc/source')
-rw-r--r--rsc/source/res/rscconst.cxx4
-rw-r--r--rsc/source/res/rsccont.cxx4
-rw-r--r--rsc/source/res/rscflag.cxx2
-rw-r--r--rsc/source/res/rscrange.cxx4
-rw-r--r--rsc/source/tools/rsctree.cxx4
5 files changed, 9 insertions, 9 deletions
diff --git a/rsc/source/res/rscconst.cxx b/rsc/source/res/rscconst.cxx
index 845cb2322a26..81c9010572df 100644
--- a/rsc/source/res/rscconst.cxx
+++ b/rsc/source/res/rscconst.cxx
@@ -123,7 +123,7 @@ ERRTYPE RscEnum::SetNumber( const RSCINST & rInst, sal_Int32 lValue )
for( i = 0; i < nEntries; i++ )
{
- if( (sal_Int32)pVarArray[ i ].lValue == lValue )
+ if( pVarArray[ i ].lValue == lValue )
return SetConst( rInst, pVarArray[ i ].nId, lValue );
}
@@ -183,7 +183,7 @@ void RscEnum::WriteSrc( const RSCINST & rInst, FILE * fOutput,
ERRTYPE RscEnum::WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
RscTypCont *, sal_uInt32 )
{
- aMem.Put( (sal_Int32)pVarArray[ reinterpret_cast<RscEnumInst *>(rInst.pData)->nValue ].lValue );
+ aMem.Put( pVarArray[ reinterpret_cast<RscEnumInst *>(rInst.pData)->nValue ].lValue );
return ERR_OK;
}
diff --git a/rsc/source/res/rsccont.cxx b/rsc/source/res/rsccont.cxx
index fbc36d4d9dc9..033ec345f380 100644
--- a/rsc/source/res/rsccont.cxx
+++ b/rsc/source/res/rsccont.cxx
@@ -534,8 +534,8 @@ bool RscBaseCont::IsConsistent( const RSCINST & rInst )
{
if( !bNoId )
{
- if( (sal_Int32)pClassData->pEntries[ i ].aName.GetNumber() > 0x7FFF ||
- (sal_Int32)pClassData->pEntries[ i ].aName.GetNumber() < 1 )
+ if( pClassData->pEntries[ i ].aName.GetNumber() > 0x7FFF ||
+ pClassData->pEntries[ i ].aName.GetNumber() < 1 )
{
bRet = false;
}
diff --git a/rsc/source/res/rscflag.cxx b/rsc/source/res/rscflag.cxx
index 6321317baf1f..10661816092f 100644
--- a/rsc/source/res/rscflag.cxx
+++ b/rsc/source/res/rscflag.cxx
@@ -288,7 +288,7 @@ ERRTYPE RscFlag::WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
Flag = 1;
}
- aMem.Put( (sal_Int32)lVal );
+ aMem.Put( lVal );
return ERR_OK;
}
diff --git a/rsc/source/res/rscrange.cxx b/rsc/source/res/rscrange.cxx
index c252c625b823..a5ef683b7ee0 100644
--- a/rsc/source/res/rscrange.cxx
+++ b/rsc/source/res/rscrange.cxx
@@ -236,7 +236,7 @@ ERRTYPE RscLongRange::WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
sal_Int32 lVal;
GetNumber( rInst, &lVal );
- aMem.Put( (sal_Int32)lVal );
+ aMem.Put( lVal );
return ERR_OK;
}
@@ -376,7 +376,7 @@ ERRTYPE RscIdRange::WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
{
sal_Int32 lVal = reinterpret_cast<RscId*>(rInst.pData)->GetNumber();
- aMem.Put( (sal_Int32)lVal );
+ aMem.Put( lVal );
return ERR_OK;
}
diff --git a/rsc/source/tools/rsctree.cxx b/rsc/source/tools/rsctree.cxx
index 410b7bb58b46..6add08277267 100644
--- a/rsc/source/tools/rsctree.cxx
+++ b/rsc/source/tools/rsctree.cxx
@@ -331,9 +331,9 @@ IdNode * IdNode::Search( sal_uInt32 nTypeName ) const
COMPARE IdNode::Compare( const NameNode * pSearch ) const
{
- if( GetId() < (sal_uInt32)(static_cast<const IdNode *>(pSearch)->GetId()) )
+ if( GetId() < static_cast<const IdNode *>(pSearch)->GetId() )
return LESS;
- else if( GetId() > (sal_uInt32)(static_cast<const IdNode *>(pSearch)->GetId()) )
+ else if( GetId() > static_cast<const IdNode *>(pSearch)->GetId() )
return GREATER;
else
return EQUAL;