Commit 1a24947c authored by Boudewijn Rempt's avatar Boudewijn Rempt

CID 248939: Result is not floating-point (UNINTENDED_INTEGER_DIVISION)

integer_division: Dividing integer expressions 255 and 100, and then
converting the integer quotient to type double. Any remainder, or
fractional part of the quotient, is ignored.
parent 81299955
......@@ -149,7 +149,7 @@ QImage KisPaintopPresetIconLibrary::hueTransform(QImage img)
if (hue > 360) {
hue -= 360;
}
int sat = qMax(qMin(c.hslSaturation()+int(ui->sldSat->value() * (255/100)), 255), 0);
int sat = qMax(qMin(c.hslSaturation() + int(ui->sldSat->value() * (255.0 / 100.0)), 255), 0);
c.setHsl(hue, sat, values.at(c.lightness()), c.alpha());
img.setPixelColor(x, y, c);
}
......
Markdown is supported
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