diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-16 10:41:03 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-21 12:44:55 +0100 |
commit | 2dbd02b576f28224204ac962f6ce20fde6687093 (patch) | |
tree | 28b3f8807d5909e7bcc3c5a629dadd6f475ad9d3 /svtools/source/brwbox | |
parent | 48314f25241e014a634dd5371543b90137ffd2bc (diff) |
loplugin:redundantfcast improvements
check for calls to constructors, and extend the list of types we check
for unnecessary temporary creation
Change-Id: Ia2c1f202b41ed6866779fff5343c821128033eec
Reviewed-on: https://gerrit.libreoffice.org/63472
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools/source/brwbox')
-rw-r--r-- | svtools/source/brwbox/brwbox1.cxx | 7 | ||||
-rw-r--r-- | svtools/source/brwbox/datwin.cxx | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx index 561d1dbe1a30..ce1918b82209 100644 --- a/svtools/source/brwbox/brwbox1.cxx +++ b/svtools/source/brwbox/brwbox1.cxx @@ -111,7 +111,7 @@ BrowseBox::BrowseBox( vcl::Window* pParent, WinBits nBits, BrowserMode nMode ) :Control( pParent, nBits | WB_3DLOOK ) ,DragSourceHelper( this ) ,DropTargetHelper( this ) - ,aHScroll( VclPtr<ScrollBar>::Create(this, WinBits( WB_HSCROLL )) ) + ,aHScroll( VclPtr<ScrollBar>::Create(this, WB_HSCROLL) ) { ConstructImpl( nMode ); } @@ -2146,10 +2146,9 @@ void BrowseBox::SetMode( BrowserMode nMode ) WinBits nVScrollWinBits = WB_VSCROLL | ( ( nMode & BrowserMode::THUMBDRAGGING ) ? WB_DRAG : 0 ); - pVScroll = VclPtr<ScrollBar>( - ( nMode & BrowserMode::TRACKING_TIPS ) == BrowserMode::TRACKING_TIPS + pVScroll = ( nMode & BrowserMode::TRACKING_TIPS ) == BrowserMode::TRACKING_TIPS ? VclPtr<BrowserScrollBar>::Create( this, nVScrollWinBits, pDataWin.get() ) - : VclPtr<ScrollBar>::Create( this, nVScrollWinBits )); + : VclPtr<ScrollBar>::Create( this, nVScrollWinBits ); pVScroll->SetLineSize( 1 ); pVScroll->SetPageSize(1); pVScroll->SetScrollHdl( LINK( this, BrowseBox, ScrollHdl ) ); diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx index 3e8ea365970b..d241e1b35913 100644 --- a/svtools/source/brwbox/datwin.cxx +++ b/svtools/source/brwbox/datwin.cxx @@ -174,7 +174,7 @@ void BrowserColumn::ZoomChanged(const Fraction& rNewZoom) BrowserDataWin::BrowserDataWin( BrowseBox* pParent ) - :Control( pParent, WinBits(WB_CLIPCHILDREN) ) + :Control( pParent, WB_CLIPCHILDREN ) ,DragSourceHelper( this ) ,DropTargetHelper( this ) ,pHeaderBar( nullptr ) |