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

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

This commit is contained in:
Sam Atkins 2022-12-21 19:34:37 +00:00 committed by Tim Flynn
parent ecbe317413
commit c36de98223
3 changed files with 22 additions and 21 deletions

View file

@ -34,8 +34,8 @@ ErrorOr<void> ProjectLoader::try_load_from_file(NonnullOwnPtr<Core::Stream::File
auto& json = json_or_error.value().as_object();
auto image = TRY(Image::try_create_from_pixel_paint_json(json));
if (json.has("guides"sv))
m_json_metadata = json.get_deprecated("guides"sv).as_array();
if (json.has_array("guides"sv))
m_json_metadata = json.get_array("guides"sv).value();
m_image = image;
return {};