mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:27:45 +00:00
PixelPaint: Port to Core::Stream
:^)
This commit is contained in:
parent
4f699d0f58
commit
301f9de915
11 changed files with 59 additions and 74 deletions
|
@ -10,15 +10,14 @@
|
|||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/JsonObject.h>
|
||||
#include <AK/Result.h>
|
||||
#include <LibCore/File.h>
|
||||
#include <LibCore/MappedFile.h>
|
||||
#include <LibImageDecoderClient/Client.h>
|
||||
|
||||
namespace PixelPaint {
|
||||
|
||||
ErrorOr<void> ProjectLoader::try_load_from_file(Core::File& file)
|
||||
ErrorOr<void> ProjectLoader::try_load_from_file(NonnullOwnPtr<Core::Stream::File> file)
|
||||
{
|
||||
auto contents = file.read_all();
|
||||
auto contents = TRY(file->read_until_eof());
|
||||
|
||||
auto json_or_error = JsonValue::from_string(contents);
|
||||
if (json_or_error.is_error()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue