mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 17:47:36 +00:00
AK: Apply changes for the Bootstrapper environment
This commit is contained in:
parent
88cf46dc98
commit
8bdb08c354
11 changed files with 43 additions and 37 deletions
|
@ -46,7 +46,7 @@ public:
|
|||
UnsignedInt32,
|
||||
Int64,
|
||||
UnsignedInt64,
|
||||
#ifndef KERNEL
|
||||
#if !defined(KERNEL) && !defined(BOOTSTRAPPER)
|
||||
Double,
|
||||
#endif
|
||||
Bool,
|
||||
|
@ -71,7 +71,7 @@ public:
|
|||
JsonValue(i64);
|
||||
JsonValue(u64);
|
||||
|
||||
#ifndef KERNEL
|
||||
#if !defined(KERNEL) && !defined(BOOTSTRAPPER)
|
||||
JsonValue(double);
|
||||
#endif
|
||||
JsonValue(bool);
|
||||
|
@ -175,7 +175,7 @@ public:
|
|||
return *m_value.as_array;
|
||||
}
|
||||
|
||||
#ifndef KERNEL
|
||||
#if !defined(KERNEL) && !defined(BOOTSTRAPPER)
|
||||
double as_double() const
|
||||
{
|
||||
ASSERT(is_double());
|
||||
|
@ -196,7 +196,7 @@ public:
|
|||
bool is_u32() const { return m_type == Type::UnsignedInt32; }
|
||||
bool is_i64() const { return m_type == Type::Int64; }
|
||||
bool is_u64() const { return m_type == Type::UnsignedInt64; }
|
||||
#ifndef KERNEL
|
||||
#if !defined(KERNEL) && !defined(BOOTSTRAPPER)
|
||||
bool is_double() const
|
||||
{
|
||||
return m_type == Type::Double;
|
||||
|
@ -214,7 +214,7 @@ public:
|
|||
case Type::UnsignedInt32:
|
||||
case Type::Int64:
|
||||
case Type::UnsignedInt64:
|
||||
#ifndef KERNEL
|
||||
#if !defined(KERNEL) && !defined(BOOTSTRAPPER)
|
||||
case Type::Double:
|
||||
#endif
|
||||
return true;
|
||||
|
@ -226,7 +226,7 @@ public:
|
|||
template<typename T>
|
||||
T to_number(T default_value = 0) const
|
||||
{
|
||||
#ifndef KERNEL
|
||||
#if !defined(KERNEL) && !defined(BOOTSTRAPPER)
|
||||
if (is_double())
|
||||
return (T)as_double();
|
||||
#endif
|
||||
|
@ -251,7 +251,7 @@ private:
|
|||
StringImpl* as_string { nullptr };
|
||||
JsonArray* as_array;
|
||||
JsonObject* as_object;
|
||||
#ifndef KERNEL
|
||||
#if !defined(KERNEL) && !defined(BOOTSTRAPPER)
|
||||
double as_double;
|
||||
#endif
|
||||
i32 as_i32;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue