(Windows) Fixed an MSVC compiler warning.

This commit is contained in:
Leon Styhre 2021-06-10 22:26:17 +02:00
parent b4028bc0f6
commit 2422d43509

View file

@ -739,7 +739,8 @@ void MiximageGenerator::calculateMarqueeSize(const unsigned int& targetWidth,
scaleFactor = static_cast<float>(adjustedTargetWidth) / static_cast<float>(width);
// For really tall and narrow images, we may have exceeded the target height.
if (static_cast<int>(scaleFactor * static_cast<float>(height)) > targetHeight)
if (static_cast<int>(scaleFactor * static_cast<float>(height)) >
static_cast<float>(targetHeight))
scaleFactor = static_cast<float>(targetHeight) / static_cast<float>(height);
width = static_cast<int>(static_cast<float>(width) * scaleFactor);