vcl/source/bitmap/BitmapBasicMorphologyFilter.cxx | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-)
New commits: commit a3ee63e617d166e5950e3d1355fe75e8fedcc48b Author: Chris Sherlock <chris.sherloc...@gmail.com> AuthorDate: Fri Sep 20 18:32:46 2024 +1000 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Fri Jan 17 23:08:54 2025 +0100 vcl: prefix member variables with 'm' in BitmapBasicMorphologyFilter Change-Id: I7258502c509584301392c45a21cf0de2ccf5bca4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173700 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/vcl/source/bitmap/BitmapBasicMorphologyFilter.cxx b/vcl/source/bitmap/BitmapBasicMorphologyFilter.cxx index 36c9d6d19c69..4c19cd7d374f 100644 --- a/vcl/source/bitmap/BitmapBasicMorphologyFilter.cxx +++ b/vcl/source/bitmap/BitmapBasicMorphologyFilter.cxx @@ -61,30 +61,30 @@ struct DilateOp template <typename MorphologyOp, int nComponentWidth> struct Value { - static constexpr int nWidthBytes = nComponentWidth / 8; - static_assert(nWidthBytes * 8 == nComponentWidth); + static constexpr int mnWidthBytes = nComponentWidth / 8; + static_assert(mnWidthBytes * 8 == nComponentWidth); - sal_uInt8 aResult[nWidthBytes]; + sal_uInt8 maResult[mnWidthBytes]; // If we are at the start or at the end of the line, consider outside value Value(FilterSharedData const& rShared, bool bLookOutside) { - std::fill_n(aResult, nWidthBytes, + std::fill_n(maResult, mnWidthBytes, bLookOutside ? rShared.mnOutsideVal : MorphologyOp::initVal); } void apply(BitmapScopedReadAccess& pReadAccess, sal_Int32 x, sal_Int32 y, sal_uInt8* pHint = nullptr) { - sal_uInt8* pSource = (pHint ? pHint : pReadAccess->GetScanline(y)) + nWidthBytes * x; - std::transform(pSource, pSource + nWidthBytes, aResult, aResult, MorphologyOp::apply); + sal_uInt8* pSource = (pHint ? pHint : pReadAccess->GetScanline(y)) + mnWidthBytes * x; + std::transform(pSource, pSource + mnWidthBytes, maResult, maResult, MorphologyOp::apply); } void copy(BitmapScopedWriteAccess& pWriteAccess, sal_Int32 x, sal_Int32 y, sal_uInt8* pHint = nullptr) { - sal_uInt8* pDest = (pHint ? pHint : pWriteAccess->GetScanline(y)) + nWidthBytes * x; - std::copy_n(aResult, nWidthBytes, pDest); + sal_uInt8* pDest = (pHint ? pHint : pWriteAccess->GetScanline(y)) + mnWidthBytes * x; + std::copy_n(maResult, mnWidthBytes, pDest); } }; @@ -96,11 +96,11 @@ template <typename MorphologyOp> struct Value<MorphologyOp, 0> MorphologyOp::initVal, MorphologyOp::initVal, MorphologyOp::initVal }; - Color aResult; + Color maResult; // If we are at the start or at the end of the line, consider outside value Value(FilterSharedData const& rShared, bool bLookOutside) - : aResult(bLookOutside ? rShared.maOutsideColor : initColor) + : maResult(bLookOutside ? rShared.maOutsideColor : initColor) { } @@ -108,16 +108,16 @@ template <typename MorphologyOp> struct Value<MorphologyOp, 0> sal_uInt8* /*pHint*/ = nullptr) { const auto aSource = pReadAccess->GetColor(y, x); - aResult = Color(ColorAlpha, MorphologyOp::apply(aSource.GetAlpha(), aResult.GetAlpha()), - MorphologyOp::apply(aSource.GetRed(), aResult.GetRed()), - MorphologyOp::apply(aSource.GetGreen(), aResult.GetGreen()), - MorphologyOp::apply(aSource.GetBlue(), aResult.GetBlue())); + maResult = Color(ColorAlpha, MorphologyOp::apply(aSource.GetAlpha(), maResult.GetAlpha()), + MorphologyOp::apply(aSource.GetRed(), maResult.GetRed()), + MorphologyOp::apply(aSource.GetGreen(), maResult.GetGreen()), + MorphologyOp::apply(aSource.GetBlue(), maResult.GetBlue())); } void copy(BitmapScopedWriteAccess& pWriteAccess, sal_Int32 x, sal_Int32 y, sal_uInt8* /*pHint*/ = nullptr) { - pWriteAccess->SetPixel(y, x, aResult); + pWriteAccess->SetPixel(y, x, maResult); } };