mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-13 03:29:49 +00:00
LibGUI: Replace uses of JsonObject::get_deprecated()/get_ptr()
This commit is contained in:
parent
4313c17d95
commit
2fce19a451
Notes:
sideshowbarker
2024-07-17 22:41:14 +09:00
Author: https://github.com/AtkinsSJ
Commit: 2fce19a451
Pull-request: https://github.com/SerenityOS/serenity/pull/17081
Reviewed-by: https://github.com/trflynn89 ✅
3 changed files with 10 additions and 8 deletions
|
@ -306,9 +306,9 @@ inline auto clamp<GUI::UIDimension>(GUI::UIDimension const& input, GUI::UIDimens
|
|||
if (!value.is_object()) \
|
||||
return false; \
|
||||
auto result_width = GUI::UIDimension::construct_from_json_value( \
|
||||
value.as_object().get_deprecated("width"sv)); \
|
||||
value.as_object().get("width"sv).value_or({})); \
|
||||
auto result_height = GUI::UIDimension::construct_from_json_value( \
|
||||
value.as_object().get_deprecated("height"sv)); \
|
||||
value.as_object().get("height"sv).value_or({})); \
|
||||
if (result_width.has_value() && result_height.has_value()) { \
|
||||
GUI::UISize size(result_width.value(), result_height.value()); \
|
||||
setter(size); \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue