sw/source/core/doc/doccomp.cxx |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

New commits:
commit a8a7fb58398047ad4b146b96a13567ed9e256100
Author:     Venetia Furtado <venetiaros...@gmail.com>
AuthorDate: Fri Jul 7 13:38:33 2023 -0600
Commit:     Hossein <hoss...@libreoffice.org>
CommitDate: Tue Jul 18 14:56:09 2023 +0200

    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 <hoss...@libreoffice.org>
    Tested-by: Hossein <hoss...@libreoffice.org>

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

Reply via email to