diff options
author | Noel <noelgrandin@gmail.com> | 2020-10-13 11:30:37 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-10-13 13:29:08 +0200 |
commit | 530d0e0569342742d7bcf529b77ba4a409cf01a9 (patch) | |
tree | 95ce9c30275c0f6806dc004e9aeab2faee5a4693 /sfx2 | |
parent | 1374f5fdcbbd24b9ba614b378fd94f5ff95ad102 (diff) |
static_cast after dynamic_cast
Change-Id: If93fa126f10393a250cc1ad64bee28e84c42a6b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104226
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/control/dispatch.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index 9c6f3c5200c2..6e6104883fe0 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -1964,8 +1964,8 @@ SfxModule* SfxDispatcher::GetModule() const SfxShell *pSh = GetShell(nShell); if ( pSh == nullptr ) return nullptr; - if ( dynamic_cast< const SfxModule *>( pSh ) != nullptr ) - return static_cast<SfxModule*>(pSh); + if ( auto pModule = dynamic_cast<SfxModule *>( pSh ) ) + return pModule; } } |