From a492e2018de1271659732ef7634ee2b9eb3ba719 Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Sun, 1 Jan 2023 22:50:49 -0700 Subject: 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. --- Userland/DevTools/Profiler/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Userland/DevTools/Profiler/main.cpp') diff --git a/Userland/DevTools/Profiler/main.cpp b/Userland/DevTools/Profiler/main.cpp index 2026ce46ef..431b09d7fa 100644 --- a/Userland/DevTools/Profiler/main.cpp +++ b/Userland/DevTools/Profiler/main.cpp @@ -327,7 +327,7 @@ static bool prompt_to_stop_profiling(pid_t pid, DeprecatedString const& process_ Core::ElapsedTimer clock; clock.start(); auto update_timer = Core::Timer::construct(100, [&] { - timer_label.set_text(DeprecatedString::formatted("{:.1} seconds", clock.elapsed() / 1000.0f)); + timer_label.set_text(DeprecatedString::formatted("{:.1} seconds", static_cast(clock.elapsed()) / 1000.0f)); }); auto& stop_button = widget->add("Stop"); -- cgit v1.2.3