mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
AK: Add to_double() to JsonValue
This commit is contained in:
parent
df5fa20bee
commit
ae1cd4b448
Notes:
sideshowbarker
2024-07-17 17:46:35 +09:00
Author: https://github.com/MichielVrins Commit: https://github.com/SerenityOS/serenity/commit/ae1cd4b448 Pull-request: https://github.com/SerenityOS/serenity/pull/12793 Reviewed-by: https://github.com/AtkinsSJ Reviewed-by: https://github.com/Hendiadyoin1 Reviewed-by: https://github.com/drunderscore Reviewed-by: https://github.com/linusg
1 changed files with 7 additions and 0 deletions
|
@ -102,6 +102,13 @@ public:
|
|||
u32 to_u32(u32 default_value = 0) const { return to_number<u32>(default_value); }
|
||||
u64 to_u64(u64 default_value = 0) const { return to_number<u64>(default_value); }
|
||||
|
||||
#if !defined(KERNEL)
|
||||
double to_double(double default_value = 0) const
|
||||
{
|
||||
return to_number<double>(default_value);
|
||||
}
|
||||
#endif
|
||||
|
||||
FlatPtr to_addr(FlatPtr default_value = 0) const
|
||||
{
|
||||
#ifdef __LP64__
|
||||
|
|
Loading…
Reference in a new issue