mirror of
https://github.com/KDE/konsole.git
synced 2025-12-23 23:38:08 -05:00
Remove un-needed optimization if()
After4522bfaeanda8927b4aqreal amplitude will not be 0 comparing floating-point with ‘==’ or ‘!=’ is unsafe
This commit is contained in:
@@ -919,8 +919,7 @@ void TerminalPainter::drawAboveText(QPainter &painter,
|
||||
const qreal amplitude = static_cast<qreal>(fontHeight) / 8.0;
|
||||
|
||||
if (underline == RE_UNDERLINE_DOUBLE) {
|
||||
if (amplitude)
|
||||
painter.drawLine(x1, y - amplitude, x2, y - amplitude);
|
||||
painter.drawLine(x1, y - amplitude, x2, y - amplitude);
|
||||
} else {
|
||||
y = std::max(static_cast<qreal>(0), y - amplitude / 2);
|
||||
assert(underline == RE_UNDERLINE_CURL);
|
||||
|
||||
Reference in New Issue
Block a user