Skip to content

Commit

Permalink
Fix unsage mix of bool and int warning. (#510)
Browse files Browse the repository at this point in the history
* Fix unsage mix of bool and int warning.

* Silghtly different approach to fixing the bool and int warning.

---------

Co-authored-by: Douglas Ayers <[email protected]>
  • Loading branch information
doug1234 and Douglas Ayers authored Jun 17, 2023
1 parent d0aef0c commit 039973e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/TerminalDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1150,7 +1150,9 @@ void TerminalDisplay::updateImage()
if (!_resizing) // not while _resizing, we're expecting a paintEvent
for (x = 0; x < columnsToUpdate; ++x)
{
_hasBlinker |= (newLine[x].rendition & RE_BLINK);
if ((newLine[x].rendition & RE_BLINK) != 0) {
_hasBlinker = true;
}

// Start drawing if this character or the next one differs.
// We also take the next one into account to handle the situation
Expand Down Expand Up @@ -1208,8 +1210,11 @@ void TerminalDisplay::updateImage()
//although both top and bottom halves contain the same characters, only
//the top one is actually
//drawn.
if (_lineProperties.count() > y)
updateLine |= (_lineProperties[y] & LINE_DOUBLEHEIGHT);
if (_lineProperties.count() > y) {
if ((_lineProperties[y] & LINE_DOUBLEHEIGHT) != 0) {
updateLine = true;
}
}

// if the characters on the line are different in the old and the new _image
// then this line must be repainted.
Expand Down

0 comments on commit 039973e

Please sign in to comment.