diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-17 11:30:06 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-17 12:34:52 +0200 |
commit | 3cb8e9e211c30089516f56f465176d3a959631f9 (patch) | |
tree | 187dee1288b0838e3acb63eef02fae552fdd6d56 /vcl/source/control/scrbar.cxx | |
parent | 434d92a51409b0847ee7d313b50fc547b7615bff (diff) |
loplugin:buriedassign in vcl
Change-Id: I529052c1ba7591d91d3848080af8b06e077b6f14
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92409
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/control/scrbar.cxx')
-rw-r--r-- | vcl/source/control/scrbar.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx index f70ad9ff4cd2..0cf1c9c5f82c 100644 --- a/vcl/source/control/scrbar.cxx +++ b/vcl/source/control/scrbar.cxx @@ -1257,11 +1257,10 @@ tools::Rectangle* ScrollBar::ImplFindPartRect( const Point& rPt ) bool ScrollBar::PreNotify( NotifyEvent& rNEvt ) { - const MouseEvent* pMouseEvt = nullptr; - - if( (rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != nullptr ) + if( rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE ) { - if( !pMouseEvt->GetButtons() && !pMouseEvt->IsSynthetic() && !pMouseEvt->IsModifierChanged() ) + const MouseEvent* pMouseEvt = rNEvt.GetMouseEvent(); + if( pMouseEvt && !pMouseEvt->GetButtons() && !pMouseEvt->IsSynthetic() && !pMouseEvt->IsModifierChanged() ) { // Trigger a redraw if mouse over state has changed if( IsNativeControlSupported(ControlType::Scrollbar, ControlPart::Entire) ) |