diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-01-20 16:56:19 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-01-20 16:56:19 +0000 |
commit | 4a149184210c4ec2e0f0fc2cfeeb0787100110be (patch) | |
tree | 2b17635bc64600dca0fcdb9c56f70c7f48802a7e /vcl | |
parent | c41b7a397411814c98dceeea07b0a26f0d01c530 (diff) |
drop pointless pointer for reference
Change-Id: Ia2c32bab6825687d4964e7a6abaa137bb48b3a3c
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/control/imgctrl.cxx | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/vcl/source/control/imgctrl.cxx b/vcl/source/control/imgctrl.cxx index 60d7b790cabd..625706f13a4a 100644 --- a/vcl/source/control/imgctrl.cxx +++ b/vcl/source/control/imgctrl.cxx @@ -77,9 +77,8 @@ void ImageControl::ImplDraw(OutputDevice& rDev, DrawFlags nDrawFlags, const Poin } const Image& rImage( GetModeImage() ); - const Image* pImage = &rImage; const Rectangle aDrawRect( rPos, rSize ); - if ( !*pImage ) + if (!rImage) { OUString sText( GetText() ); if ( sText.isEmpty() ) @@ -95,23 +94,20 @@ void ImageControl::ImplDraw(OutputDevice& rDev, DrawFlags nDrawFlags, const Poin return; } - const Size& rBitmapSize = pImage->GetSizePixel(); + const Size& rBitmapSize = rImage.GetSizePixel(); switch ( mnScaleMode ) { case ImageScaleMode::NONE: { - rDev.DrawImage( lcl_centerWithin( aDrawRect, rBitmapSize ), *pImage, nStyle ); + rDev.DrawImage(lcl_centerWithin( aDrawRect, rBitmapSize ), rImage, nStyle); } break; case ImageScaleMode::ISOTROPIC: { const Size aPaintSize = lcl_calcPaintSize( aDrawRect, rBitmapSize ); - rDev.DrawImage( - lcl_centerWithin( aDrawRect, aPaintSize ), - aPaintSize, - *pImage, nStyle ); + rDev.DrawImage(lcl_centerWithin(aDrawRect, aPaintSize), aPaintSize, rImage, nStyle); } break; @@ -120,7 +116,7 @@ void ImageControl::ImplDraw(OutputDevice& rDev, DrawFlags nDrawFlags, const Poin rDev.DrawImage( aDrawRect.TopLeft(), aDrawRect.GetSize(), - *pImage, nStyle ); + rImage, nStyle ); } break; |