mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-13 15:17:51 +00:00
ResultVal: Remove MoveFrom()
Replace it with std::move(result_val).Unwrap(), or Foo().Unwrap() in case you already have an rvalue.
This commit is contained in:
parent
ec6a30b8bb
commit
c27dad4cd1
24 changed files with 53 additions and 57 deletions
|
@ -311,7 +311,7 @@ ResultVal<std::shared_ptr<File>> OpenFileFromArchive(ArchiveHandle archive_handl
|
|||
if (backend.Failed())
|
||||
return backend.Code();
|
||||
|
||||
auto file = std::shared_ptr<File>(new File(backend.MoveFrom(), path));
|
||||
auto file = std::shared_ptr<File>(new File(std::move(backend).Unwrap(), path));
|
||||
return MakeResult<std::shared_ptr<File>>(std::move(file));
|
||||
}
|
||||
|
||||
|
@ -401,7 +401,7 @@ ResultVal<std::shared_ptr<Directory>> OpenDirectoryFromArchive(ArchiveHandle arc
|
|||
if (backend.Failed())
|
||||
return backend.Code();
|
||||
|
||||
auto directory = std::shared_ptr<Directory>(new Directory(backend.MoveFrom(), path));
|
||||
auto directory = std::shared_ptr<Directory>(new Directory(std::move(backend).Unwrap(), path));
|
||||
return MakeResult<std::shared_ptr<Directory>>(std::move(directory));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue