tdf#114441 Replace sal_uLong by size_t in doccomp.cxx

GetLineCount() returns size_t, so change the data type for relevant
variables. Also change the max values for preceding and other_preceding,
from ULONG_MAX to SIZE_MAX.

Change-Id: I973ce68808dd77efb7326d4177499d0fe1e5d764
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208745
Reviewed-by: Hossein <hossein@libreoffice.org>
Tested-by: Jenkins
This commit is contained in:
ApurvR20
2026-08-16 00:40:22 +02:00
committed by Hossein
parent 5785f998a2
commit bfb4eff4ea
+7 -6
View File
@@ -47,6 +47,7 @@
#include <com/sun/star/frame/XModel3.hpp>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <type_traits>
#include <vector>
@@ -937,15 +938,15 @@ namespace
{
void lcl_ShiftBoundariesOneway( CompareData* const pData, CompareData const * const pOtherData)
{
sal_uLong i = 0;
sal_uLong j = 0;
sal_uLong i_end = pData->GetLineCount();
sal_uLong preceding = ULONG_MAX;
sal_uLong other_preceding = ULONG_MAX;
size_t i = 0;
size_t j = 0;
size_t i_end = pData->GetLineCount();
size_t preceding = SIZE_MAX;
size_t other_preceding = SIZE_MAX;
while (true)
{
sal_uLong start, other_start;
size_t start, other_start;
/* Scan forwards to find beginning of another run of changes.
Also keep track of the corresponding point in the other file. */