mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:07:35 +00:00
LibWebView: Replace uses of JsonObject::get_deprecated()/get_ptr()
This commit is contained in:
parent
d8fde14324
commit
3cc376d1a2
4 changed files with 32 additions and 39 deletions
|
@ -49,11 +49,9 @@ private:
|
|||
return *parent_node;
|
||||
}
|
||||
|
||||
ALWAYS_INLINE static JsonArray const* get_children(JsonObject const& o)
|
||||
ALWAYS_INLINE static Optional<JsonArray const&> const get_children(JsonObject const& o)
|
||||
{
|
||||
if (auto const* maybe_children = o.get_ptr("children"sv); maybe_children)
|
||||
return &maybe_children->as_array();
|
||||
return nullptr;
|
||||
return o.get_array("children"sv);
|
||||
}
|
||||
|
||||
void map_dom_nodes_to_parent(JsonObject const* parent, JsonObject const* child);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue