vcl/source/bitmap/BitmapEx.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
New commits: commit 30563605dd78f23cc832c6cd426c0f76576ab47d Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Fri Apr 25 18:52:35 2025 +0200 Commit: Noel Grandin <noelgran...@gmail.com> CommitDate: Fri Apr 25 21:31:09 2025 +0200 tdf#165595 no need to call Width/Height on every iteration of loop Change-Id: I78a2d1069ccfeafad6be298b9730fa4e72d7df8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184635 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/vcl/source/bitmap/BitmapEx.cxx b/vcl/source/bitmap/BitmapEx.cxx index 0d734eaa1831..63ac3d965b92 100644 --- a/vcl/source/bitmap/BitmapEx.cxx +++ b/vcl/source/bitmap/BitmapEx.cxx @@ -949,11 +949,11 @@ BitmapEx BitmapEx::ModifyBitmapEx(const basegfx::BColorModifierStack& rBColorMod } else if(ScanlineFormat::N24BitTcBgr == xContent->GetScanlineFormat()) { - for(tools::Long y(0); y < xContent->Height(); y++) + for(tools::Long y(0), nHeight(xContent->Height()); y < nHeight; y++) { Scanline pScan = xContent->GetScanline(y); - for(tools::Long x(0); x < xContent->Width(); x++) + for(tools::Long x(0), nWidth(xContent->Width()); x < nWidth; x++) { const basegfx::BColor aBSource( *(pScan + 2)* fConvertColor, @@ -968,11 +968,11 @@ BitmapEx BitmapEx::ModifyBitmapEx(const basegfx::BColorModifierStack& rBColorMod } else if(ScanlineFormat::N24BitTcRgb == xContent->GetScanlineFormat()) { - for(tools::Long y(0); y < xContent->Height(); y++) + for(tools::Long y(0), nHeight(xContent->Height()); y < nHeight; y++) { Scanline pScan = xContent->GetScanline(y); - for(tools::Long x(0); x < xContent->Width(); x++) + for(tools::Long x(0), nWidth(xContent->Width()); x < nWidth; x++) { const basegfx::BColor aBSource( *pScan * fConvertColor, @@ -987,10 +987,10 @@ BitmapEx BitmapEx::ModifyBitmapEx(const basegfx::BColorModifierStack& rBColorMod } else { - for(tools::Long y(0); y < xContent->Height(); y++) + for(tools::Long y(0), nHeight(xContent->Height()); y < nHeight; y++) { Scanline pScanline = xContent->GetScanline( y ); - for(tools::Long x(0); x < xContent->Width(); x++) + for(tools::Long x(0), nWidth(xContent->Width()); x < nWidth; x++) { const BitmapColor aBMCol(xContent->GetColor(y, x)); const basegfx::BColor aBSource(