vcl/source/bitmap/BlendFrameCache.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit f8bf05b294102bbc5dc4b4763cd2288de781288a Author: Christopher Sherlock <chris.sherloc...@gmail.com> AuthorDate: Wed Jan 22 18:34:55 2025 +1100 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Wed Jan 22 17:37:49 2025 +0100 vcl: don't initialize variable and then immediately clobber it in for loop As pointed out by Mike Kaganski in https://gerrit.libreoffice.org/c/core/+/177805 we are setting the loop counter to 0 and then immediately reinitializing it to 1 in the for loop. As this is not necessary, just declaring the variable initially without initializing it. Change-Id: Ia91cd6c46a62786dc14c459f1b44daecd758ec90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180567 Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> Tested-by: Jenkins diff --git a/vcl/source/bitmap/BlendFrameCache.cxx b/vcl/source/bitmap/BlendFrameCache.cxx index 56738369fbb2..92d982d5e4d8 100644 --- a/vcl/source/bitmap/BlendFrameCache.cxx +++ b/vcl/source/bitmap/BlendFrameCache.cxx @@ -57,7 +57,7 @@ BlendFrameCache::BlendFrameCache(Size const& rSize, sal_uInt8 nAlpha, Color cons pContent->SetPixelOnData(pScanContent, 0, rColorTopLeft); pAlpha->SetPixelOnData(pScanAlpha, 0, BitmapColor(nAlpha)); - tools::Long x(0); + tools::Long x; const tools::Long nW(rSize.Width()); // y == 0, top line left to right @@ -78,7 +78,7 @@ BlendFrameCache::BlendFrameCache(Size const& rSize, sal_uInt8 nAlpha, Color cons pAlpha->SetPixelOnData(pScanAlpha, x, BitmapColor(nAlpha)); } - tools::Long y(0); + tools::Long y; const tools::Long nH(rSize.Height()); // x == 0 and nW - 1, left and right line top-down