From ed7d1c49c0a898772e7f81416b3414da8cc35f2e Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 24 Oct 2023 08:20:06 +0200 Subject: [PATCH] svx: prefix members of SdrLayerIDSet See tdf#94879 for motivation. Change-Id: Ibac67e7f8535b231f63a01b7e572595f5b91a996 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158368 Reviewed-by: Miklos Vajna Tested-by: Jenkins --- include/svx/svdsob.hxx | 16 ++++++++-------- svx/source/svdraw/svdlayer.cxx | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/svx/svdsob.hxx b/include/svx/svdsob.hxx index 7e2b8578e01d..9d19a673641f 100644 --- a/include/svx/svdsob.hxx +++ b/include/svx/svdsob.hxx @@ -31,31 +31,31 @@ class SVXCORE_DLLPUBLIC SdrLayerIDSet final { // For now, have up to 256 layers - sal_uInt8 aData[32]; + sal_uInt8 m_aData[32]; public: explicit SdrLayerIDSet(bool bInitVal = false) { - memset(aData, bInitVal ? 0xFF : 0x00, sizeof(aData)); + memset(m_aData, bInitVal ? 0xFF : 0x00, sizeof(m_aData)); } bool operator!=(const SdrLayerIDSet& rCmpSet) const { - return (memcmp(aData, rCmpSet.aData, sizeof(aData))!=0); + return (memcmp(m_aData, rCmpSet.m_aData, sizeof(m_aData))!=0); } void Set(SdrLayerID a) { const sal_Int16 nId = a.get(); if (nId >= 0 && nId < 256) - aData[nId / 8] |= 1 << (nId % 8); + m_aData[nId / 8] |= 1 << (nId % 8); } void Clear(SdrLayerID a) { const sal_Int16 nId = a.get(); if (nId >= 0 && nId < 256) - aData[nId / 8] &= ~(1 << (nId % 8)); + m_aData[nId / 8] &= ~(1 << (nId % 8)); } void Set(SdrLayerID a, bool b) @@ -69,17 +69,17 @@ public: bool IsSet(SdrLayerID a) const { const sal_Int16 nId = a.get(); - return nId >= 0 && nId < 256 && (aData[nId / 8] & 1 << nId % 8) != 0; + return nId >= 0 && nId < 256 && (m_aData[nId / 8] & 1 << nId % 8) != 0; } void SetAll() { - memset(aData, 0xFF, sizeof(aData)); + memset(m_aData, 0xFF, sizeof(m_aData)); } void ClearAll() { - memset(aData, 0x00, sizeof(aData)); + memset(m_aData, 0x00, sizeof(m_aData)); } bool IsEmpty() const; diff --git a/svx/source/svdraw/svdlayer.cxx b/svx/source/svdraw/svdlayer.cxx index cb482b9fc2a9..74d5222f92b1 100644 --- a/svx/source/svdraw/svdlayer.cxx +++ b/svx/source/svdraw/svdlayer.cxx @@ -27,7 +27,7 @@ bool SdrLayerIDSet::IsEmpty() const { - for(sal_uInt8 i : aData) + for(sal_uInt8 i : m_aData) { if(i != 0) return false; @@ -40,7 +40,7 @@ void SdrLayerIDSet::operator&=(const SdrLayerIDSet& r2ndSet) { for(sal_uInt16 i(0); i < 32; i++) { - aData[i] &= r2ndSet.aData[i]; + m_aData[i] &= r2ndSet.m_aData[i]; } } @@ -59,12 +59,12 @@ void SdrLayerIDSet::PutValue( const css::uno::Any & rAny ) sal_Int16 nIndex; for( nIndex = 0; nIndex < nCount; nIndex++ ) { - aData[nIndex] = static_cast(aSeq[nIndex]); + m_aData[nIndex] = static_cast(aSeq[nIndex]); } for( ; nIndex < 32; nIndex++ ) { - aData[nIndex] = 0; + m_aData[nIndex] = 0; } }