summaryrefslogtreecommitdiff
path: root/vcl/source/control/scrbar.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-04-17 11:30:06 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-04-17 12:34:52 +0200
commit3cb8e9e211c30089516f56f465176d3a959631f9 (patch)
tree187dee1288b0838e3acb63eef02fae552fdd6d56 /vcl/source/control/scrbar.cxx
parent434d92a51409b0847ee7d313b50fc547b7615bff (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.cxx7
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) )