From 9d70aa318ed48038d6dc0040551057d833e8dd8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Pereira?= Date: Fri, 13 Oct 2023 18:23:58 +0100 Subject: [PATCH] Revert "qtermwidget: silence false positive cppcheck warning about assert with side effect" This reverts commit f61af9cc6d0021a3eaabdb6b2e11d4f6642a04c9. Commit 634e66e39666a1e9da715295711cb9ffa5bb58fe makes it unneeded. --- lib/Screen.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/Screen.cpp b/lib/Screen.cpp index 2d1058cc..4424f236 100644 --- a/lib/Screen.cpp +++ b/lib/Screen.cpp @@ -455,7 +455,6 @@ void Screen::updateEffectiveRendition() void Screen::copyFromHistory(Character* dest, int startLine, int count) const { - // cppcheck-suppress assertWithSideEffect Q_ASSERT( startLine >= 0 && count > 0 && startLine + count <= history->getLines() ); for (int line = startLine; line < startLine + count; line++) @@ -509,7 +508,6 @@ void Screen::copyFromScreen(Character* dest , int startLine , int count) const void Screen::getImage( Character* dest, int size, int startLine, int endLine ) const { Q_ASSERT( startLine >= 0 ); - // cppcheck-suppress assertWithSideEffect Q_ASSERT( endLine >= startLine && endLine < history->getLines() + lines ); const int mergedLines = endLine - startLine + 1; @@ -546,7 +544,6 @@ void Screen::getImage( Character* dest, int size, int startLine, int endLine ) c QVector Screen::getLineProperties( int startLine , int endLine ) const { Q_ASSERT( startLine >= 0 ); - // cppcheck-suppress assertWithSideEffect Q_ASSERT( endLine >= startLine && endLine < history->getLines() + lines ); const int mergedLines = endLine-startLine+1; @@ -1266,7 +1263,6 @@ int Screen::copyLineToStream(int line , // safety checks Q_ASSERT( start >= 0 ); Q_ASSERT( count >= 0 ); - // cppcheck-suppress assertWithSideEffect Q_ASSERT( (start+count) <= history->getLineLen(line) ); history->getCells(line,start,count,characterBuffer);