mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 09:51:57 -05:00
AK: Add to_double() to JsonValue
This commit is contained in:
parent
df5fa20bee
commit
ae1cd4b448
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…
Add table
Reference in a new issue