1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:47:34 +00:00

LibGUI: Replace uses of JsonObject::get_deprecated()/get_ptr()

This commit is contained in:
Sam Atkins 2022-12-21 17:27:41 +00:00 committed by Tim Flynn
parent 4313c17d95
commit 2fce19a451
3 changed files with 10 additions and 8 deletions

View file

@ -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); \