mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-28 02:27:19 +02:00
LibJS: Add all of the DataView.prototype.set* methods
This commit is contained in:
committed by
Linus Groh
parent
c54b9a6920
commit
d7a70eb77c
Notes:
sideshowbarker
2024-07-18 12:17:02 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/d7a70eb77ce Pull-request: https://github.com/SerenityOS/serenity/pull/8045 Reviewed-by: https://github.com/linusg
@@ -102,6 +102,17 @@ String UnsignedBigInteger::to_base10() const
|
||||
return builder.to_string();
|
||||
}
|
||||
|
||||
u64 UnsignedBigInteger::to_u64() const
|
||||
{
|
||||
VERIFY(sizeof(Word) == 4);
|
||||
if (!length())
|
||||
return 0;
|
||||
u64 value = m_words[0];
|
||||
if (length() > 1)
|
||||
value |= static_cast<u64>(m_words[1]) << 32;
|
||||
return value;
|
||||
}
|
||||
|
||||
void UnsignedBigInteger::set_to_0()
|
||||
{
|
||||
m_words.clear_with_capacity();
|
||||
|
||||
Reference in New Issue
Block a user