mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-18 09:04:23 -04:00
libstrat: convert to experimental new (super-accurate) sf allocation semantics
This commit is contained in:
parent
8314d015f3
commit
f06de12bea
149 changed files with 2852 additions and 1746 deletions
|
@ -79,10 +79,11 @@ namespace ams::pgl {
|
|||
::PglEventObserver obs;
|
||||
R_TRY(::pglGetEventObserver(std::addressof(obs)));
|
||||
|
||||
auto remote_observer = ams::sf::MakeShared<pgl::sf::IEventObserver, RemoteEventObserver>(obs);
|
||||
AMS_ABORT_UNLESS(remote_observer != nullptr);
|
||||
/* TODO: Real allocator */
|
||||
auto remote_observer = ams::sf::CreateSharedObjectEmplaced<pgl::sf::IEventObserver, RemoteEventObserver>(obs);
|
||||
R_UNLESS(remote_observer != nullptr, pgl::ResultOutOfMemory());
|
||||
|
||||
*out = pgl::EventObserver(remote_observer);
|
||||
*out = pgl::EventObserver(std::move(remote_observer));
|
||||
return ResultSuccess();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue