diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-04 14:50:06 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-05 08:37:05 +0200 |
commit | 6e3a5631861ba8b8072fae6c3e5bb1a81627b612 (patch) | |
tree | 672a35f1782c60742b3b671fb6457758e6ca3cfd /vcl | |
parent | 1db4ada4fc3a3bf1bd6b6d27bb17867cfb7b4709 (diff) |
loplugin:unusedfields various
Change-Id: Ia7bcf2471381aa6a2768ea795fe6572e38209100
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/unx/salbmp.h | 2 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/salbmp.cxx | 17 |
2 files changed, 7 insertions, 12 deletions
diff --git a/vcl/inc/unx/salbmp.h b/vcl/inc/unx/salbmp.h index 5165fa6bb0ab..6f9de187dd11 100644 --- a/vcl/inc/unx/salbmp.h +++ b/vcl/inc/unx/salbmp.h @@ -227,7 +227,7 @@ public: ImplSalBitmapCache(); ~ImplSalBitmapCache(); - void ImplAdd( X11SalBitmap* pBmp, sal_uIntPtr nMemSize ); + void ImplAdd( X11SalBitmap* pBmp ); void ImplRemove( X11SalBitmap* pBmp ); void ImplClear(); }; diff --git a/vcl/unx/generic/gdi/salbmp.cxx b/vcl/unx/generic/gdi/salbmp.cxx index d972ee56571c..7d9a1d1db526 100644 --- a/vcl/unx/generic/gdi/salbmp.cxx +++ b/vcl/unx/generic/gdi/salbmp.cxx @@ -691,7 +691,7 @@ ImplSalDDB* X11SalBitmap::ImplGetDDB( XDestroyImage( pImage ); if( mpCache ) - mpCache->ImplAdd( const_cast<X11SalBitmap*>(this), mpDDB->ImplGetMemSize() ); + mpCache->ImplAdd( const_cast<X11SalBitmap*>(this) ); } } @@ -1078,10 +1078,9 @@ void ImplSalDDB::ImplDraw( struct ImplBmpObj { X11SalBitmap* mpBmp; - sal_uLong mnMemSize; - ImplBmpObj( X11SalBitmap* pBmp, sal_uLong nMemSize ) : - mpBmp( pBmp ), mnMemSize( nMemSize ) {} + ImplBmpObj( X11SalBitmap* pBmp ) : + mpBmp( pBmp ) {} }; ImplSalBitmapCache::ImplSalBitmapCache() @@ -1093,7 +1092,7 @@ ImplSalBitmapCache::~ImplSalBitmapCache() ImplClear(); } -void ImplSalBitmapCache::ImplAdd( X11SalBitmap* pBmp, sal_uLong nMemSize ) +void ImplSalBitmapCache::ImplAdd( X11SalBitmap* pBmp ) { ImplBmpObj* pObj = nullptr; bool bFound = false; @@ -1108,12 +1107,8 @@ void ImplSalBitmapCache::ImplAdd( X11SalBitmap* pBmp, sal_uLong nMemSize ) bFound = true; } - if( bFound ) - { - pObj->mnMemSize = nMemSize; - } - else - maBmpList.push_back( new ImplBmpObj( pBmp, nMemSize ) ); + if( !bFound ) + maBmpList.push_back( new ImplBmpObj( pBmp ) ); } void ImplSalBitmapCache::ImplRemove( X11SalBitmap* pBmp ) |