diff options
author | Andrew Kaster <akaster@serenityos.org> | 2023-01-01 22:50:49 -0700 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-01-07 14:51:04 +0100 |
commit | a492e2018de1271659732ef7634ee2b9eb3ba719 (patch) | |
tree | a5f9ea815e20bafe7ee7b028aab6421c2c85b8ec /Userland/DevTools/Profiler/main.cpp | |
parent | 48bf0b1408880422f1dea7c3f1330f18560f361b (diff) | |
download | serenity-a492e2018de1271659732ef7634ee2b9eb3ba719.zip |
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.
Diffstat (limited to 'Userland/DevTools/Profiler/main.cpp')
-rw-r--r-- | Userland/DevTools/Profiler/main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<float>(clock.elapsed()) / 1000.0f)); }); auto& stop_button = widget->add<GUI::Button>("Stop"); |