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/Libraries/LibWeb | |
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/Libraries/LibWeb')
-rw-r--r-- | Userland/Libraries/LibWeb/HighResolutionTime/Performance.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/HighResolutionTime/Performance.h b/Userland/Libraries/LibWeb/HighResolutionTime/Performance.h index b2b8cd01f4..2853b3c056 100644 --- a/Userland/Libraries/LibWeb/HighResolutionTime/Performance.h +++ b/Userland/Libraries/LibWeb/HighResolutionTime/Performance.h @@ -17,7 +17,7 @@ class Performance final : public DOM::EventTarget { public: virtual ~Performance() override; - double now() const { return m_timer.elapsed(); } + double now() const { return static_cast<double>(m_timer.elapsed()); } double time_origin() const; JS::GCPtr<NavigationTiming::PerformanceTiming> timing(); |