Commit 1fd3bee3 authored by Frederik Gladhorn's avatar Frederik Gladhorn
Browse files

Use fuzzy compare for floats

While unlikely to be problematic here, silence warning and rather be
safe.
parent 2de7f50e
......@@ -253,7 +253,7 @@ void Doctor::parsePositionalArgs()
scale = dbl.toDouble(&ok);
};
// set scale
if (!ok || scale == 0 || !setScale(output_id, scale)) {
if (!ok || qFuzzyCompare(scale, 0.0) || !setScale(output_id, scale)) {
qCDebug(KSCREEN_DOCTOR) << "Could not set scale " << scale << " to output " << output_id;
qApp->exit(9);
return;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment