Remove un-needed optimization if()

After 4522bfae and a8927b4a qreal amplitude will not be 0

comparing floating-point with ‘==’ or ‘!=’ is unsafe
This commit is contained in:
Kurt Hindenburg
2025-12-13 14:09:23 -05:00
parent 5c61123d9a
commit be8dc07b28

View File

@@ -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);