Fix comparison of integer expressions of different signedness warnings

This commit is contained in:
Nyall Dawson
2024-01-12 08:11:23 +10:00
committed by Jakub Melka
parent bbecbf6311
commit 577866aa2f
11 changed files with 16 additions and 16 deletions

View File

@ -773,7 +773,7 @@ void PDFDiff::performCompare(const std::vector<PDFDiffPageContext>& leftPrepared
pageIndex1 = textItem->pageIndex;
}
if (textCompareItem.charIndex + textCompareItem.charCount <= textItem->characterBoundingRects.size())
if (static_cast< std::size_t >( textCompareItem.charIndex ) + textCompareItem.charCount <= textItem->characterBoundingRects.size())
{
const size_t startIndex = textCompareItem.charIndex;
const size_t endIndex = startIndex + textCompareItem.charCount;
@ -801,7 +801,7 @@ void PDFDiff::performCompare(const std::vector<PDFDiffPageContext>& leftPrepared
pageIndex2 = textItem->pageIndex;
}
if (textCompareItem.charIndex + textCompareItem.charCount <= textItem->characterBoundingRects.size())
if (static_cast< std::size_t >(textCompareItem.charIndex) + textCompareItem.charCount <= textItem->characterBoundingRects.size())
{
const size_t startIndex = textCompareItem.charIndex;
const size_t endIndex = startIndex + textCompareItem.charCount;