1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:37:35 +00:00

Userland: Silence warnings from ElapsedTimer::elapsed() type change

We changed elapsed() to return i64 instead of int as that's what
AK::Time::to_milliseconds() returns, causing a bunch of implicit lossy
conversions in callers. Clean those up with a mix of type changes and
casts.
This commit is contained in:
Andrew Kaster 2023-01-01 22:50:49 -07:00 committed by Linus Groh
parent 48bf0b1408
commit a492e2018d
7 changed files with 9 additions and 10 deletions

View file

@ -47,7 +47,7 @@ void Animation::was_removed(Badge<Compositor>)
bool Animation::update(Badge<Compositor>, Gfx::Painter& painter, Screen& screen, Gfx::DisjointIntRectSet& flush_rects)
{
int elapsed_ms = m_timer.elapsed();
i64 const elapsed_ms = m_timer.elapsed();
float progress = min((float)elapsed_ms / (float)m_duration, 1.0f);
if (on_update)