Browse Source

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.
Linus Groh 4 years ago
parent
commit
aef502e8e0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Userland/Libraries/LibJS/Runtime/PropertyName.h

+ 1 - 1
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;