AK: Add to_double() to JsonValue

This commit is contained in:
Vrins 2022-02-27 01:31:36 +01:00 committed by Andreas Kling
parent df5fa20bee
commit ae1cd4b448
Notes: sideshowbarker 2024-07-17 17:46:35 +09:00

View file

@ -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__