Remove use of C-style casts
This commit is contained in:
committed by
Jonas Kvinge
parent
637772f8f0
commit
b38ad81928
@@ -296,7 +296,7 @@ void TranscodeDialog::UpdateProgress() {
|
||||
QMap<QString, float> current_jobs = transcoder_->GetProgress();
|
||||
QList<float> values = current_jobs.values();
|
||||
for (const float value : values) {
|
||||
progress += qBound(0, int(value * 100), 99);
|
||||
progress += qBound(0, static_cast<int>(value * 100), 99);
|
||||
}
|
||||
|
||||
ui_->progress_bar->setValue(progress);
|
||||
|
||||
@@ -552,7 +552,7 @@ QMap<QString, float> Transcoder::GetProgress() const {
|
||||
gst_element_query_position(state->pipeline_, GST_FORMAT_TIME, &position);
|
||||
gst_element_query_duration(state->pipeline_, GST_FORMAT_TIME, &duration);
|
||||
|
||||
ret[state->job_.input] = float(position) / duration;
|
||||
ret[state->job_.input] = static_cast<float>(position) / duration;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -88,7 +88,7 @@ void TranscoderOptionsMP3::Save() {
|
||||
}
|
||||
|
||||
void TranscoderOptionsMP3::QualitySliderChanged(int value) {
|
||||
ui_->quality_spinbox->setValue(float(value) / 100);
|
||||
ui_->quality_spinbox->setValue(static_cast<float>(value) / 100);
|
||||
}
|
||||
|
||||
void TranscoderOptionsMP3::QualitySpinboxChanged(double value) {
|
||||
|
||||
@@ -80,7 +80,7 @@ void TranscoderOptionsVorbis::Save() {
|
||||
GET_BITRATE(max_bitrate, ui_->max_bitrate_slider);
|
||||
#undef GET_BITRATE
|
||||
|
||||
s.setValue("quality", double(ui_->quality_slider->value()) / 10);
|
||||
s.setValue("quality", static_cast<double>(ui_->quality_slider->value()) / 10);
|
||||
s.setValue("managed", ui_->managed->isChecked());
|
||||
s.setValue("bitrate", bitrate);
|
||||
s.setValue("min-bitrate", min_bitrate);
|
||||
|
||||
Reference in New Issue
Block a user