Skip to content

Commit

Permalink
Revert "qtermwidget: silence false positive cppcheck warning about as…
Browse files Browse the repository at this point in the history
…sert with side effect"

This reverts commit f61af9c.
Commit 634e66e makes it unneeded.
  • Loading branch information
luis-pereira authored and yan12125 committed Oct 14, 2023
1 parent d257d03 commit 7f501f5
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions lib/Screen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -546,7 +544,6 @@ void Screen::getImage( Character* dest, int size, int startLine, int endLine ) c
QVector<LineProperty> 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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 7f501f5

Please sign in to comment.