Everywhere: Add -Wdouble-promotion warning

This warning informs of float-to-double conversions. The best solution
seems to be to do math *either* in 32-bit *or* in 64-bit, and only to
cross over when absolutely necessary.
This commit is contained in:
Nicholas-Baron 2021-04-15 00:36:14 -07:00 committed by Andreas Kling
commit 73dd293ec4
Notes: sideshowbarker 2024-07-18 20:16:18 +09:00
26 changed files with 105 additions and 98 deletions

View file

@ -68,7 +68,7 @@ MouseSettingsWindow::MouseSettingsWindow()
m_speed_slider->on_change = [&](const int value) {
m_speed_label->set_text(String::formatted("{} %", value));
};
const int slider_value = speed_slider_scale * GUI::WindowServerConnection::the().send_sync<Messages::WindowServer::GetMouseAcceleration>()->factor();
const int slider_value = float { speed_slider_scale } * GUI::WindowServerConnection::the().send_sync<Messages::WindowServer::GetMouseAcceleration>()->factor();
m_speed_slider->set_value(slider_value);
m_scroll_length_spinbox = *main_widget.find_descendant_of_type_named<GUI::SpinBox>("scroll_length_spinbox");