mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:24:57 +00:00
AK: Remove JsonObject::get_deprecated() and ::get_ptr() :^)
This commit is contained in:
parent
d48e632696
commit
7d0529b89c
2 changed files with 0 additions and 24 deletions
|
@ -47,26 +47,6 @@ bool JsonObject::is_empty() const
|
|||
return m_members.is_empty();
|
||||
}
|
||||
|
||||
JsonValue const& JsonObject::get_deprecated(StringView key) const
|
||||
{
|
||||
auto const* value = get_ptr(key);
|
||||
static JsonValue* s_null_value { nullptr };
|
||||
if (!value) {
|
||||
if (!s_null_value)
|
||||
s_null_value = new JsonValue;
|
||||
return *s_null_value;
|
||||
}
|
||||
return *value;
|
||||
}
|
||||
|
||||
JsonValue const* JsonObject::get_ptr(StringView key) const
|
||||
{
|
||||
auto it = m_members.find(key);
|
||||
if (it == m_members.end())
|
||||
return nullptr;
|
||||
return &(*it).value;
|
||||
}
|
||||
|
||||
Optional<JsonValue const&> JsonObject::get(StringView key) const
|
||||
{
|
||||
auto it = m_members.find(key);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue