diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-03-06 14:40:40 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-03-09 11:33:43 +0100 |
commit | abe39f7781f59b96c5a8d3dd5b41c60fdf04ad84 (patch) | |
tree | 0f72d1968e5f25e3f280688a414398e3f4a7cce8 /vcl/unx/generic | |
parent | bdb1c72198f60fdd91460e26282134d43bc0e2df (diff) |
improve loplugin:unusedfields
noticed something that wasn't being picked up, wrote some tests,
and found an unhandled case in Plugin::getParentFunctionDecl
Change-Id: I52b4ea273be6614e197392dfc4d6053bbc1704de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90141
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/unx/generic')
-rw-r--r-- | vcl/unx/generic/app/saldisp.cxx | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx index 4ffea9b58364..99d0652df7ff 100644 --- a/vcl/unx/generic/app/saldisp.cxx +++ b/vcl/unx/generic/app/saldisp.cxx @@ -2518,10 +2518,9 @@ Pixel SalVisual::GetTCPixel( Color nColor ) const SalColormap::SalColormap( const SalDisplay *pDisplay, Colormap hColormap, SalX11Screen nXScreen ) : m_pDisplay( pDisplay ), - m_hColormap( hColormap ), - m_nXScreen( nXScreen ) + m_hColormap( hColormap ) { - m_aVisual = m_pDisplay->GetVisual( m_nXScreen ); + m_aVisual = m_pDisplay->GetVisual( nXScreen ); XColor aColor; @@ -2587,8 +2586,7 @@ SalColormap::SalColormap() m_hColormap( None ), m_nWhitePixel( 1 ), m_nBlackPixel( 0 ), - m_nUsed( 2 ), - m_nXScreen( m_pDisplay != nullptr ? m_pDisplay->GetDefaultXScreen() : SalX11Screen( 0 ) ) + m_nUsed( 2 ) { m_aPalette = std::vector<Color>(m_nUsed); @@ -2602,10 +2600,10 @@ SalColormap::SalColormap( sal_uInt16 nDepth ) m_hColormap( None ), m_nWhitePixel( (1 << nDepth) - 1 ), m_nBlackPixel( 0x00000000 ), - m_nUsed( 1 << nDepth ), - m_nXScreen( vcl_sal::getSalDisplay(GetGenericUnixSalData())->GetDefaultXScreen() ) + m_nUsed( 1 << nDepth ) { - const SalVisual *pVisual = &m_pDisplay->GetVisual( m_nXScreen ); + SalX11Screen nXScreen( vcl_sal::getSalDisplay(GetGenericUnixSalData())->GetDefaultXScreen() ); + const SalVisual *pVisual = &m_pDisplay->GetVisual( nXScreen ); if( pVisual->GetClass() == TrueColor && pVisual->GetDepth() == nDepth ) m_aVisual = *pVisual; |