summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-10-21 15:36:20 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-10-21 19:04:20 +0200
commit1fac487cfbb1d6c0bb1b3ccdfe44c4645c7e087e (patch)
treeb8d87e56f79a5da32590d786d163bca17ae1bbeb /sw/inc
parentea5d4bab6c54432bf590f8650d9f5ea930a0daaa (diff)
use sal_Int32 in BigPtrArray
now that it's only use-case is also using sal_Int32 Change-Id: I9c51bb8fd6b8f5713b84b1a1f0a216e676a73299 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123995 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/bparr.hxx22
1 files changed, 11 insertions, 11 deletions
diff --git a/sw/inc/bparr.hxx b/sw/inc/bparr.hxx
index d28e964685d7..f4c1c47d6da1 100644
--- a/sw/inc/bparr.hxx
+++ b/sw/inc/bparr.hxx
@@ -41,7 +41,7 @@ public:
virtual ~BigPtrEntry() = default;
BigPtrEntry & operator =(BigPtrEntry const &) = default;
- inline sal_uLong GetPos() const;
+ inline sal_Int32 GetPos() const;
inline BigPtrArray& GetArray() const;
};
@@ -59,7 +59,7 @@ struct BlockInfo final
BigPtrArray* pBigArr; ///< in this array the block is located
std::array<BigPtrEntry*, MAXENTRY>
mvData; ///< data block
- sal_uLong nStart, nEnd; ///< start- and end index
+ sal_Int32 nStart, nEnd; ///< start- and end index
sal_uInt16 nElem; ///< number of elements
};
@@ -68,13 +68,13 @@ class SW_DLLPUBLIC BigPtrArray
protected:
std::unique_ptr<BlockInfo*[]>
m_ppInf; ///< block info
- sal_uLong m_nSize; ///< number of elements
+ sal_Int32 m_nSize; ///< number of elements
sal_uInt16 m_nMaxBlock; ///< current max. number of blocks
sal_uInt16 m_nBlock; ///< number of blocks
mutable
sal_uInt16 m_nCur; ///< last used block
- sal_uInt16 Index2Block( sal_uLong ) const; ///< block search
+ sal_uInt16 Index2Block( sal_Int32 ) const; ///< block search
BlockInfo* InsBlock( sal_uInt16 ); ///< insert block
void BlockDel( sal_uInt16 ); ///< some blocks were deleted
void UpdIndex( sal_uInt16 ); ///< recalculate indices
@@ -86,17 +86,17 @@ public:
BigPtrArray();
~BigPtrArray();
- sal_uLong Count() const { return m_nSize; }
+ sal_Int32 Count() const { return m_nSize; }
- void Insert( BigPtrEntry* p, sal_uLong pos );
- void Remove( sal_uLong pos, sal_uLong n = 1 );
- void Move( sal_uLong from, sal_uLong to );
- void Replace( sal_uLong pos, BigPtrEntry* p);
+ void Insert( BigPtrEntry* p, sal_Int32 pos );
+ void Remove( sal_Int32 pos, sal_Int32 n = 1 );
+ void Move( sal_Int32 from, sal_Int32 to );
+ void Replace( sal_Int32 pos, BigPtrEntry* p);
- BigPtrEntry* operator[]( sal_uLong ) const;
+ BigPtrEntry* operator[]( sal_Int32 ) const;
};
-inline sal_uLong BigPtrEntry::GetPos() const
+inline sal_Int32 BigPtrEntry::GetPos() const
{
assert(this == m_pBlock->mvData[ m_nOffset ]); // element not in the block
return m_pBlock->nStart + m_nOffset;