diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-05-18 09:51:46 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-05-18 10:52:59 +0200 |
commit | 41a967af06a9584a997e11079c3c931d34158c09 (patch) | |
tree | 494ca16d2d6148ad54ceacec4ab170f57efd8dd2 /basic | |
parent | 1b6ecb1dc544b7a462948a1c85d4bfc6f08865b8 (diff) |
Extend loplugin:redundantcast to trivial reinterpret_cast from T to itself
Change-Id: I7c0be7b435d6b5f97bdd40484023584146638d70
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134506
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/classes/sbxmod.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 67bf03ef9ecb..1e5e7ec36a7f 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -1450,7 +1450,7 @@ const sal_uInt8* SbModule::FindNextStmnt( const sal_uInt8* p, sal_uInt16& nLine, const sal_uInt8* SbModule::FindNextStmnt( const sal_uInt8* p, sal_uInt16& nLine, sal_uInt16& nCol, bool bFollowJumps, const SbiImage* pImg ) const { - sal_uInt32 nPC = static_cast<sal_uInt32>( p - reinterpret_cast<const sal_uInt8*>(pImage->GetCode()) ); + sal_uInt32 nPC = static_cast<sal_uInt32>( p - pImage->GetCode() ); while( nPC < pImage->GetCodeSize() ) { SbiOpcode eOp = static_cast<SbiOpcode>( *p++ ); @@ -1460,7 +1460,7 @@ const sal_uInt8* SbModule::FindNextStmnt( const sal_uInt8* p, sal_uInt16& nLine, SAL_WARN_IF( !pImg, "basic", "FindNextStmnt: pImg==NULL with FollowJumps option" ); sal_uInt32 nOp1 = *p++; nOp1 |= *p++ << 8; nOp1 |= *p++ << 16; nOp1 |= *p++ << 24; - p = reinterpret_cast<const sal_uInt8*>(pImg->GetCode()) + nOp1; + p = pImg->GetCode() + nOp1; } else if( eOp >= SbiOpcode::SbOP1_START && eOp <= SbiOpcode::SbOP1_END ) { @@ -1497,7 +1497,7 @@ bool SbModule::IsBreakable( sal_uInt16 nLine ) const { if( !pImage ) return false; - const sal_uInt8* p = reinterpret_cast<const sal_uInt8*>(pImage->GetCode()); + const sal_uInt8* p = pImage->GetCode(); sal_uInt16 nl, nc; while( ( p = FindNextStmnt( p, nl, nc ) ) != nullptr ) if( nl == nLine ) |