diff --git a/Pdf4QtLibCore/sources/pdfannotation.cpp b/Pdf4QtLibCore/sources/pdfannotation.cpp index 9466c01..8034779 100644 --- a/Pdf4QtLibCore/sources/pdfannotation.cpp +++ b/Pdf4QtLibCore/sources/pdfannotation.cpp @@ -2646,7 +2646,7 @@ PDFAnnotationDefaultAppearance PDFAnnotationDefaultAppearance::parse(const QByte auto readNumber = [&tokens](size_t index) -> PDFReal { - Q_ASSERT(index >= 0 && index < tokens.size()); + Q_ASSERT(index < tokens.size()); const PDFLexicalAnalyzer::Token& token = tokens[index]; if (token.type == PDFLexicalAnalyzer::TokenType::Real || token.type == PDFLexicalAnalyzer::TokenType::Integer) diff --git a/Pdf4QtLibCore/sources/pdfdiff.cpp b/Pdf4QtLibCore/sources/pdfdiff.cpp index 165fc2d..970cc86 100644 --- a/Pdf4QtLibCore/sources/pdfdiff.cpp +++ b/Pdf4QtLibCore/sources/pdfdiff.cpp @@ -1814,7 +1814,7 @@ void PDFDiffResultNavigator::setResult(const PDFDiffResult* diffResult) bool PDFDiffResultNavigator::isSelected() const { const size_t limit = getLimit(); - return m_currentIndex >= 0 && m_currentIndex < limit; + return m_currentIndex < limit; } bool PDFDiffResultNavigator::canGoNext() const