[Libreoffice-commits] core.git: sw/inc sw/source
Miklos Vajna
vmiklos at collabora.co.uk
Mon Dec 5 09:40:26 UTC 2016
sw/inc/bparr.hxx | 12 ++++++------
sw/source/core/bastyp/bparr.cxx | 24 ++++++++++++------------
2 files changed, 18 insertions(+), 18 deletions(-)
New commits:
commit 57fb44833f7a4bdde741ad7d424ddf9f399fcf8d
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon Dec 5 09:14:32 2016 +0100
sw: prefix members of BigPtrEntry
Change-Id: Ibe1f647e7e370287e2b4d6110e66b726ddda8e3a
diff --git a/sw/inc/bparr.hxx b/sw/inc/bparr.hxx
index 53a3f18..cbb63d3 100644
--- a/sw/inc/bparr.hxx
+++ b/sw/inc/bparr.hxx
@@ -31,10 +31,10 @@ class BigPtrArray;
class BigPtrEntry
{
friend class BigPtrArray;
- BlockInfo* pBlock;
- sal_uInt16 nOffset;
+ BlockInfo* m_pBlock;
+ sal_uInt16 m_nOffset;
public:
- BigPtrEntry() : pBlock(nullptr), nOffset(0) {}
+ BigPtrEntry() : m_pBlock(nullptr), m_nOffset(0) {}
virtual ~BigPtrEntry() {}
inline sal_uLong GetPos() const;
@@ -92,13 +92,13 @@ public:
inline sal_uLong BigPtrEntry::GetPos() const
{
- assert(this == pBlock->pData[ nOffset ]); // element not in the block
- return pBlock->nStart + nOffset;
+ assert(this == m_pBlock->pData[ m_nOffset ]); // element not in the block
+ return m_pBlock->nStart + m_nOffset;
}
inline BigPtrArray& BigPtrEntry::GetArray() const
{
- return *pBlock->pBigArr;
+ return *m_pBlock->pBigArr;
}
#endif
diff --git a/sw/source/core/bastyp/bparr.cxx b/sw/source/core/bastyp/bparr.cxx
index f4cd902..443d194 100644
--- a/sw/source/core/bastyp/bparr.cxx
+++ b/sw/source/core/bastyp/bparr.cxx
@@ -243,7 +243,7 @@ void BigPtrArray::Insert( const ElementPtr& rElem, sal_uLong pos )
ElementPtr *pFrom = q->pData + nCount,
*pTo = pFrom+1;
while( nCount-- )
- ++( *--pTo = *--pFrom )->nOffset;
+ ++( *--pTo = *--pFrom )->m_nOffset;
}
q->nStart--;
q->nEnd--;
@@ -267,8 +267,8 @@ void BigPtrArray::Insert( const ElementPtr& rElem, sal_uLong pos )
// entry does not fit anymore - clear space
ElementPtr pLast = p->pData[ MAXENTRY-1 ];
- pLast->nOffset = 0;
- pLast->pBlock = q;
+ pLast->m_nOffset = 0;
+ pLast->m_pBlock = q;
q->pData[ 0 ] = pLast;
q->nElem++;
@@ -286,11 +286,11 @@ void BigPtrArray::Insert( const ElementPtr& rElem, sal_uLong pos )
ElementPtr *pFrom = p->pData + p->nElem;
ElementPtr *pTo = pFrom + 1;
while( nCount-- )
- ++( *--pTo = *--pFrom )->nOffset;
+ ++( *--pTo = *--pFrom )->m_nOffset;
}
// insert element and update indices
- rElem->nOffset = sal_uInt16(pos);
- rElem->pBlock = p;
+ rElem->m_nOffset = sal_uInt16(pos);
+ rElem->m_pBlock = p;
p->pData[ pos ] = rElem;
p->nEnd++;
p->nElem++;
@@ -327,7 +327,7 @@ void BigPtrArray::Remove( sal_uLong pos, sal_uLong n )
while( nCount-- )
{
*pTo = *pFrom++;
- (*pTo)->nOffset = (*pTo)->nOffset - nel;
+ (*pTo)->m_nOffset = (*pTo)->m_nOffset - nel;
++pTo;
}
}
@@ -391,8 +391,8 @@ void BigPtrArray::Replace( sal_uLong idx, const ElementPtr& rElem)
assert(idx < m_nSize); // Index out of bounds
m_nCur = Index2Block( idx );
BlockInfo* p = m_ppInf[ m_nCur ];
- rElem->nOffset = sal_uInt16(idx - p->nStart);
- rElem->pBlock = p;
+ rElem->m_nOffset = sal_uInt16(idx - p->nStart);
+ rElem->m_pBlock = p;
p->pData[ idx - p->nStart ] = rElem;
}
@@ -440,8 +440,8 @@ sal_uInt16 BigPtrArray::Compress()
nCount; --nCount, ++pElem )
{
*pElem = *pFrom++;
- (*pElem)->pBlock = pLast;
- (*pElem)->nOffset = nOff++;
+ (*pElem)->m_pBlock = pLast;
+ (*pElem)->m_nOffset = nOff++;
}
// adjustment
@@ -466,7 +466,7 @@ sal_uInt16 BigPtrArray::Compress()
while( nCount-- )
{
*pElem = *pFrom++;
- (*pElem)->nOffset = (*pElem)->nOffset - n;
+ (*pElem)->m_nOffset = (*pElem)->m_nOffset - n;
++pElem;
}
}
More information about the Libreoffice-commits
mailing list