summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/Value.cpp
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-03-22 22:56:47 +0100
committerAndreas Kling <kling@serenityos.org>2021-03-23 08:22:39 +0100
commit40eab55e7d4e757d6b3fcf18d26db8c6c40bbc25 (patch)
tree27f6a6aea7b494c155dd1064a33054988ff8df2c /Userland/Libraries/LibJS/Runtime/Value.cpp
parenta1014d25def3e0eedec45a35218af63d449fa0b6 (diff)
downloadserenity-40eab55e7d4e757d6b3fcf18d26db8c6c40bbc25.zip
LibJS: Remove as_size_t()
Just like to_size_t() - which was already removed in f369229 - this is non-standard, use to_length() instead. One remaining use was removed, and I'm glad it's gone. :^)
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/Value.cpp')
-rw-r--r--Userland/Libraries/LibJS/Runtime/Value.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Value.cpp b/Userland/Libraries/LibJS/Runtime/Value.cpp
index c5467eb300..a31e760e37 100644
--- a/Userland/Libraries/LibJS/Runtime/Value.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Value.cpp
@@ -517,12 +517,6 @@ u32 Value::as_u32() const
return min((double)as_i32(), MAX_U32);
}
-size_t Value::as_size_t() const
-{
- VERIFY(as_double() >= 0);
- return min((double)as_i32(), MAX_ARRAY_LIKE_INDEX);
-}
-
double Value::to_double(GlobalObject& global_object) const
{
auto number = to_number(global_object);