Kaydet (Commit) 07f5d983 authored tarafından Miklos Vajna's avatar Miklos Vajna

sw: prefix members of SwCache

Change-Id: I2896dffca4d13dd95612fa463c66eb5a769d5650
Reviewed-on: https://gerrit.libreoffice.org/25952Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: 's avatarJenkins <ci@libreoffice.org>
üst 106bcf13
...@@ -53,13 +53,13 @@ typedef std::vector<SwCacheObj*> SwCacheObjArr; ...@@ -53,13 +53,13 @@ typedef std::vector<SwCacheObj*> SwCacheObjArr;
class SwCache class SwCache
{ {
SwCacheObjArr m_aCacheObjects; SwCacheObjArr m_aCacheObjects;
std::vector<sal_uInt16> aFreePositions; /// Free positions for the Insert if the maximum has not been reached std::vector<sal_uInt16> m_aFreePositions; /// Free positions for the Insert if the maximum has not been reached
/// Every time an object is deregistered, its position is added here /// Every time an object is deregistered, its position is added here
SwCacheObj *pRealFirst; /// _ALWAYS_ the real first LRU SwCacheObj *m_pRealFirst; /// _ALWAYS_ the real first LRU
SwCacheObj *pFirst; /// The virtual first SwCacheObj *m_pFirst; /// The virtual first
SwCacheObj *pLast; SwCacheObj *m_pLast;
sal_uInt16 nCurMax; // Maximum of accepted objects sal_uInt16 m_nCurMax; // Maximum of accepted objects
void DeleteObj( SwCacheObj *pObj ); void DeleteObj( SwCacheObj *pObj );
...@@ -105,12 +105,12 @@ public: ...@@ -105,12 +105,12 @@ public:
void Delete( const void *pOwner ); void Delete( const void *pOwner );
void SetLRUOfst( const sal_uInt16 nOfst ); /// nOfst determines how many are not to be touched void SetLRUOfst( const sal_uInt16 nOfst ); /// nOfst determines how many are not to be touched
void ResetLRUOfst() { pFirst = pRealFirst; } void ResetLRUOfst() { m_pFirst = m_pRealFirst; }
inline void IncreaseMax( const sal_uInt16 nAdd ); inline void IncreaseMax( const sal_uInt16 nAdd );
inline void DecreaseMax( const sal_uInt16 nSub ); inline void DecreaseMax( const sal_uInt16 nSub );
sal_uInt16 GetCurMax() const { return nCurMax; } sal_uInt16 GetCurMax() const { return m_nCurMax; }
inline SwCacheObj *First() { return pRealFirst; } inline SwCacheObj *First() { return m_pRealFirst; }
static inline SwCacheObj *Next( SwCacheObj *pCacheObj); static inline SwCacheObj *Next( SwCacheObj *pCacheObj);
inline SwCacheObj* operator[](sal_uInt16 nIndex) { return m_aCacheObjects[nIndex]; } inline SwCacheObj* operator[](sal_uInt16 nIndex) { return m_aCacheObjects[nIndex]; }
inline sal_uInt16 size() { return m_aCacheObjects.size(); } inline sal_uInt16 size() { return m_aCacheObjects.size(); }
...@@ -214,15 +214,15 @@ public: ...@@ -214,15 +214,15 @@ public:
inline void SwCache::IncreaseMax( const sal_uInt16 nAdd ) inline void SwCache::IncreaseMax( const sal_uInt16 nAdd )
{ {
nCurMax = nCurMax + sal::static_int_cast< sal_uInt16 >(nAdd); m_nCurMax = m_nCurMax + sal::static_int_cast< sal_uInt16 >(nAdd);
#ifdef DBG_UTIL #ifdef DBG_UTIL
++m_nIncreaseMax; ++m_nIncreaseMax;
#endif #endif
} }
inline void SwCache::DecreaseMax( const sal_uInt16 nSub ) inline void SwCache::DecreaseMax( const sal_uInt16 nSub )
{ {
if ( nCurMax > nSub ) if ( m_nCurMax > nSub )
nCurMax = nCurMax - sal::static_int_cast< sal_uInt16 >(nSub); m_nCurMax = m_nCurMax - sal::static_int_cast< sal_uInt16 >(nSub);
#ifdef DBG_UTIL #ifdef DBG_UTIL
++m_nDecreaseMax; ++m_nDecreaseMax;
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment