mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-04 09:22:53 +00:00
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:
parent
6606d70826
commit
73dd293ec4
Notes:
sideshowbarker
2024-07-18 20:16:18 +09:00
Author: https://github.com/Nicholas-Baron
Commit: 73dd293ec4
Pull-request: https://github.com/SerenityOS/serenity/pull/6355
26 changed files with 105 additions and 98 deletions
|
@ -616,7 +616,7 @@ void ClientConnection::handle(const Messages::WindowServer::DidFinishPainting& m
|
|||
auto& window = *(*it).value;
|
||||
for (auto& rect : message.rects())
|
||||
window.invalidate(rect);
|
||||
if (window.has_alpha_channel() && window.alpha_hit_threshold() > 0.0)
|
||||
if (window.has_alpha_channel() && window.alpha_hit_threshold() > 0.0f)
|
||||
WindowManager::the().reevaluate_hovered_window(&window);
|
||||
|
||||
WindowSwitcher::the().refresh_if_needed();
|
||||
|
@ -940,11 +940,12 @@ OwnPtr<Messages::WindowServer::GetGlobalCursorPositionResponse> ClientConnection
|
|||
|
||||
OwnPtr<Messages::WindowServer::SetMouseAccelerationResponse> ClientConnection::handle(const Messages::WindowServer::SetMouseAcceleration& message)
|
||||
{
|
||||
if (message.factor() < mouse_accel_min || message.factor() > mouse_accel_max) {
|
||||
double factor = message.factor();
|
||||
if (factor < mouse_accel_min || factor > mouse_accel_max) {
|
||||
did_misbehave("SetMouseAcceleration with bad acceleration factor");
|
||||
return {};
|
||||
}
|
||||
WindowManager::the().set_acceleration_factor(message.factor());
|
||||
WindowManager::the().set_acceleration_factor(factor);
|
||||
return make<Messages::WindowServer::SetMouseAccelerationResponse>();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue