summaryrefslogtreecommitdiff
path: root/AK/JsonValue.h
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2020-02-09 16:50:13 +0200
committerAndreas Kling <kling@serenityos.org>2020-02-09 19:38:17 +0100
commit8bdb08c354f6334b05847a57a82a9f841ac85b64 (patch)
tree4c6ca16e8bf3b804a409a5899fbe76355e79322b /AK/JsonValue.h
parent88cf46dc98df0db4952ebf23db0cf198bdf601f9 (diff)
downloadserenity-8bdb08c354f6334b05847a57a82a9f841ac85b64.zip
AK: Apply changes for the Bootstrapper environment
Diffstat (limited to 'AK/JsonValue.h')
-rw-r--r--AK/JsonValue.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/AK/JsonValue.h b/AK/JsonValue.h
index fca35bbee8..a109b671be 100644
--- a/AK/JsonValue.h
+++ b/AK/JsonValue.h
@@ -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;