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
commit 2fce19a451
Notes: sideshowbarker 2024-07-17 22:41:14 +09:00
3 changed files with 10 additions and 8 deletions

View file

@ -56,8 +56,8 @@ ErrorOr<void> CommonLocationsProvider::load_from_json(StringView json_path)
if (!entry_value.is_object())
continue;
auto entry = entry_value.as_object();
auto name = entry.get_deprecated("name"sv).to_deprecated_string();
auto path = entry.get_deprecated("path"sv).to_deprecated_string();
auto name = entry.get_deprecated_string("name"sv).value_or({});
auto path = entry.get_deprecated_string("path"sv).value_or({});
TRY(s_common_locations.try_append({ name, path }));
}