From aef502e8e0be8f394981ebe89bdfc75f7c7fd68b Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Sun, 25 Apr 2021 22:42:48 +0200 Subject: [PATCH] LibJS: Change PropertyName::as_number() return type to u32 This is how it's stored internally - even though we still only construct from i32. I had the compiler yell at me while trying something with this and didn't want to add yet another cast, so let's quickly fix this. --- Userland/Libraries/LibJS/Runtime/PropertyName.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibJS/Runtime/PropertyName.h b/Userland/Libraries/LibJS/Runtime/PropertyName.h index bcc63b481c..45bae0f347 100644 --- a/Userland/Libraries/LibJS/Runtime/PropertyName.h +++ b/Userland/Libraries/LibJS/Runtime/PropertyName.h @@ -86,7 +86,7 @@ public: bool is_string() const { return m_type == Type::String; } bool is_symbol() const { return m_type == Type::Symbol; } - i32 as_number() const + u32 as_number() const { VERIFY(is_number()); return m_number;