From 4a149184210c4ec2e0f0fc2cfeeb0787100110be Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 20 Jan 2017 16:56:19 +0000 Subject: drop pointless pointer for reference Change-Id: Ia2c32bab6825687d4964e7a6abaa137bb48b3a3c --- vcl/source/control/imgctrl.cxx | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'vcl') 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; -- cgit