diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-10-06 10:50:12 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-10-06 15:10:51 +0100 |
commit | 31ee230b6efac9a6a60ceb5c2367ae9a5cf98929 (patch) | |
tree | c7ff6f56f5295caa88bda7ceb2036691e3db5c36 /basic/source/comp | |
parent | 5a242f651c8ae8d53ac67f5059f64629303848ab (diff) |
Related: tdf#94814 some cleanup of static_cast following dynamic_cast
to the same type
Change-Id: I197e88acbc30f8e8bb9e7f2d54803971df6062af
Diffstat (limited to 'basic/source/comp')
-rw-r--r-- | basic/source/comp/parser.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/basic/source/comp/parser.cxx b/basic/source/comp/parser.cxx index c3e7a898fceb..29533876dfb2 100644 --- a/basic/source/comp/parser.cxx +++ b/basic/source/comp/parser.cxx @@ -156,10 +156,9 @@ SbiSymDef* SbiParser::CheckRTLForSym(const OUString& rSym, SbxDataType eType) if (!pVar) return nullptr; - if (dynamic_cast<const SbxMethod *>(pVar) != nullptr) + if (SbxMethod* pMethod = dynamic_cast<SbxMethod*>(pVar)) { SbiProcDef* pProc_ = aRtlSyms.AddProc( rSym ); - SbxMethod* pMethod = static_cast<SbxMethod*>(pVar); if (pMethod->IsRuntimeFunction()) { pProc_->SetType( pMethod->GetRuntimeFunctionReturnType() ); |