Commit b3e78332 authored by Eric Jiang's avatar Eric Jiang Committed by Jean-Baptiste Mardelle
Browse files

Fix cast to double moved outside division

At some point this code was changed from double/int division to
double(int/int) division. This patch changes it back to double/int,
implicitly making both the dividend and the divisor doubles.
parent 3e348936
Pipeline #211317 passed with stage
in 6 minutes and 23 seconds
......@@ -1424,12 +1424,12 @@ void RenderWidget::refreshParams()
std::unique_ptr<ProfileModel> &projectProfile = pCore->getCurrentProfile();
if (params.contains(QLatin1String("%dv_standard"))) {
QString dvstd;
if (fmod(double(projectProfile->frame_rate_num() / projectProfile->frame_rate_den()), 30.01) > 27) {
if (fmod(double(projectProfile->frame_rate_num()) / projectProfile->frame_rate_den(), 30.01) > 27) {
dvstd = QStringLiteral("ntsc");
} else {
dvstd = QStringLiteral("pal");
}
if (double(projectProfile->display_aspect_num() / projectProfile->display_aspect_den()) > 1.5) {
if (double(projectProfile->display_aspect_num()) / projectProfile->display_aspect_den() > 1.5) {
dvstd += QLatin1String("_wide");
}
params.replace(QLatin1String("%dv_standard"), dvstd);
......
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