hle: kernel: Migrate KReadableEvent and KWritableEvent to KAutoObject.

This commit is contained in:
bunnei 2021-04-10 02:34:26 -07:00
parent eba3bb9d21
commit 2e8d6fe9a0
35 changed files with 219 additions and 204 deletions

View file

@ -88,11 +88,9 @@ struct DeliveryCacheDirectoryEntry {
class IDeliveryCacheProgressService final : public ServiceFramework<IDeliveryCacheProgressService> {
public:
explicit IDeliveryCacheProgressService(Core::System& system_,
std::shared_ptr<Kernel::KReadableEvent> event_,
explicit IDeliveryCacheProgressService(Core::System& system_, Kernel::KReadableEvent& event_,
const DeliveryCacheProgressImpl& impl_)
: ServiceFramework{system_, "IDeliveryCacheProgressService"}, event{std::move(event_)},
impl{impl_} {
: ServiceFramework{system_, "IDeliveryCacheProgressService"}, event{event_}, impl{impl_} {
// clang-format off
static const FunctionInfo functions[] = {
{0, &IDeliveryCacheProgressService::GetEvent, "GetEvent"},
@ -109,7 +107,7 @@ private:
IPC::ResponseBuilder rb{ctx, 2, 1};
rb.Push(RESULT_SUCCESS);
rb.PushCopyObjects(event.get());
rb.PushCopyObjects(event);
}
void GetImpl(Kernel::HLERequestContext& ctx) {
@ -121,7 +119,7 @@ private:
rb.Push(RESULT_SUCCESS);
}
std::shared_ptr<Kernel::KReadableEvent> event;
Kernel::KReadableEvent& event;
const DeliveryCacheProgressImpl& impl;
};