summaryrefslogtreecommitdiff
path: root/svx/source/stbctrls
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2018-08-09 16:30:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-08-10 08:20:28 +0200
commit7fdd5a12f6d20422ebda1d3afd5e5146cadbe0e5 (patch)
tree0370d19faf39b778517b2bce6c483cc0c82a11e0 /svx/source/stbctrls
parentb268ef57e97e692644335afeae834205ecb73557 (diff)
unnecessary null check before dynamic_cast, in svx
Change-Id: I5174c9530d18e5d88ad8a41cc2bb02c6d090f3cf Reviewed-on: https://gerrit.libreoffice.org/58771 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/stbctrls')
-rw-r--r--svx/source/stbctrls/pszctrl.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx
index 3205dccd32f0..1659a35c1f0e 100644
--- a/svx/source/stbctrls/pszctrl.cxx
+++ b/svx/source/stbctrls/pszctrl.cxx
@@ -275,8 +275,8 @@ void SvxPosSizeStatusBarControl::StateChanged( sal_uInt16 nSID, SfxItemState eSt
if ( eState == SfxItemState::DEFAULT )
{
pImpl->bHasMenu = true;
- if ( pState && dynamic_cast< const SfxUInt32Item* >(pState) != nullptr )
- pImpl->nFunctionSet = static_cast<const SfxUInt32Item*>(pState)->GetValue();
+ if ( auto pUInt32Item = dynamic_cast< const SfxUInt32Item* >(pState) )
+ pImpl->nFunctionSet = pUInt32Item->GetValue();
}
else
pImpl->bHasMenu = false;