Commit 6146c1b8 authored by Eric Jiang's avatar Eric Jiang
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 f4aeb5ef
Pipeline #211315 canceled with stage
in 1 minute
......@@ -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