more fixes, will merge fixes for w4245 and w4389

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-08-13 12:29:24 -07:00
parent 3522f622f3
commit e9b4f48f71
31 changed files with 21 additions and 133 deletions
+4 -8
View File
@@ -61,15 +61,11 @@ QColor ScaleColor(const QColor& c, float aScale)
aColor = QColor(1, 1, 1);
}
int r = aColor.red();
int g = aColor.green();
int b = aColor.blue();
const float r = static_cast<float>(aColor.red()) * aScale;
const float g = static_cast<float>(aColor.green()) * aScale;
const float b = static_cast<float>(aColor.blue()) * aScale;
r *= aScale;
g *= aScale;
b *= aScale;
return QColor(CLAMP(r, 0, 255), CLAMP(g, 0, 255), CLAMP(b, 0, 255));
return QColor(CLAMP(static_cast<int>(r), 0, 255), CLAMP(static_cast<int>(g), 0, 255), CLAMP(static_cast<int>(b), 0, 255));
}
CAlphaBitmap::CAlphaBitmap()