summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorVenetia Furtado <venetiarosita@gmail.com>2023-07-07 13:38:33 -0600
committerHossein <hossein@libreoffice.org>2023-07-18 14:56:09 +0200
commita8a7fb58398047ad4b146b96a13567ed9e256100 (patch)
tree13bc2e22cb65cff395e9d5f8a40a1ff6499525ec /sw/source
parent9a96c395d52984628b759104f9ce2a7781d0e139 (diff)
tdf#114441: Replace sal_uLong with size_t in doccomp.cxx
The caller of Compare::CheckDiscard passes value of type size_t. Therefore, replaced the type of the method’s first argument from sal_uLong to size_t. Further, refactored all dependent variables to size_t as well. Change-Id: Id32a88936e92f0d30aa6a7a07412a91845beed63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154203 Reviewed-by: Hossein <hossein@libreoffice.org> Tested-by: Hossein <hossein@libreoffice.org>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/doc/doccomp.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx
index 32ec6bb85aaa..65450a561064 100644
--- a/sw/source/core/doc/doccomp.cxx
+++ b/sw/source/core/doc/doccomp.cxx
@@ -241,7 +241,7 @@ private:
static void CountDifference( const CompareData& rData, sal_uLong* pCounts );
static void SetDiscard( const CompareData& rData,
char* pDiscard, const sal_uLong* pCounts );
- static void CheckDiscard( sal_uLong nLen, char* pDiscard );
+ static void CheckDiscard( size_t nLen, char* pDiscard );
static void ShiftBoundaries( CompareData& rData1, CompareData& rData2 );
public:
@@ -642,17 +642,17 @@ void Compare::SetDiscard( const CompareData& rData,
}
}
-void Compare::CheckDiscard( sal_uLong nLen, char* pDiscard )
+void Compare::CheckDiscard( size_t nLen, char* pDiscard )
{
- for( sal_uLong n = 0; n < nLen; ++n )
+ for( size_t n = 0; n < nLen; ++n )
{
if( 2 == pDiscard[ n ] )
pDiscard[n] = 0;
else if( pDiscard[ n ] )
{
- sal_uLong j;
- sal_uLong length;
- sal_uLong provisional = 0;
+ size_t j;
+ size_t length;
+ size_t provisional = 0;
/* Find end of this run of discardable lines.
Count how many are provisionally discardable. */
@@ -685,9 +685,9 @@ void Compare::CheckDiscard( sal_uLong nLen, char* pDiscard )
}
else
{
- sal_uLong consec;
- sal_uLong minimum = 1;
- sal_uLong tem = length / 4;
+ size_t consec;
+ size_t minimum = 1;
+ size_t tem = length / 4;
/* MINIMUM is approximate square root of LENGTH/4.
A subrun of two or more provisionals can stand