mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-22 17:24:48 -05:00
AK: Remove unused JsonValue <=> IPv4Address conversion code
This removes code that isn't used anywhere.
This commit is contained in:
parent
06df26da67
commit
48da8a568d
Notes:
sideshowbarker
2024-07-18 16:57:58 +09:00
Author: https://github.com/gunnarbeutner Commit: https://github.com/SerenityOS/serenity/commit/48da8a568d8 Pull-request: https://github.com/SerenityOS/serenity/pull/7726
3 changed files with 1 additions and 14 deletions
|
@ -181,11 +181,6 @@ JsonValue::JsonValue(const String& value)
|
|||
}
|
||||
}
|
||||
|
||||
JsonValue::JsonValue(const IPv4Address& value)
|
||||
: JsonValue(value.to_string())
|
||||
{
|
||||
}
|
||||
|
||||
JsonValue::JsonValue(const JsonObject& value)
|
||||
: m_type(Type::Object)
|
||||
{
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/Forward.h>
|
||||
#include <AK/IPv4Address.h>
|
||||
#include <AK/Optional.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
|
@ -55,7 +54,6 @@ public:
|
|||
JsonValue(bool);
|
||||
JsonValue(const char*);
|
||||
JsonValue(const String&);
|
||||
JsonValue(const IPv4Address&);
|
||||
JsonValue(const JsonArray&);
|
||||
JsonValue(const JsonObject&);
|
||||
|
||||
|
@ -85,13 +83,6 @@ public:
|
|||
return serialized<StringBuilder>();
|
||||
}
|
||||
|
||||
Optional<IPv4Address> to_ipv4_address() const
|
||||
{
|
||||
if (!is_string())
|
||||
return {};
|
||||
return IPv4Address::from_string(as_string());
|
||||
}
|
||||
|
||||
int to_int(int default_value = 0) const { return to_i32(default_value); }
|
||||
i32 to_i32(i32 default_value = 0) const { return to_number<i32>(default_value); }
|
||||
i64 to_i64(i64 default_value = 0) const { return to_number<i64>(default_value); }
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include <AK/Assertions.h>
|
||||
#include <AK/IPv4Address.h>
|
||||
#include <AK/JsonArray.h>
|
||||
#include <AK/JsonObject.h>
|
||||
#include <AK/NumberFormat.h>
|
||||
|
|
Loading…
Reference in a new issue