From 9046d4a5485452802b756869b7d27056ba9ea9d7 Mon Sep 17 00:00:00 2001 From: bunnei Date: Sun, 24 Nov 2019 20:15:51 -0500 Subject: kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects. (#3154) * kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects. - See https://github.com/citra-emu/citra/pull/4710 for details. --- src/core/hle/service/am/am.cpp | 5 ++--- src/core/hle/service/am/am.h | 4 ++-- src/core/hle/service/am/applets/applets.cpp | 6 +++--- src/core/hle/service/am/applets/applets.h | 6 +++--- 4 files changed, 10 insertions(+), 11 deletions(-) (limited to 'src/core/hle/service/am') diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index 701f05019..3ebb92994 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp @@ -531,12 +531,11 @@ AppletMessageQueue::AppletMessageQueue(Kernel::KernelCore& kernel) { AppletMessageQueue::~AppletMessageQueue() = default; -const Kernel::SharedPtr& AppletMessageQueue::GetMesssageRecieveEvent() - const { +const std::shared_ptr& AppletMessageQueue::GetMesssageRecieveEvent() const { return on_new_message.readable; } -const Kernel::SharedPtr& AppletMessageQueue::GetOperationModeChangedEvent() +const std::shared_ptr& AppletMessageQueue::GetOperationModeChangedEvent() const { return on_operation_mode_changed.readable; } diff --git a/src/core/hle/service/am/am.h b/src/core/hle/service/am/am.h index 06a65b5ed..448817be9 100644 --- a/src/core/hle/service/am/am.h +++ b/src/core/hle/service/am/am.h @@ -54,8 +54,8 @@ public: explicit AppletMessageQueue(Kernel::KernelCore& kernel); ~AppletMessageQueue(); - const Kernel::SharedPtr& GetMesssageRecieveEvent() const; - const Kernel::SharedPtr& GetOperationModeChangedEvent() const; + const std::shared_ptr& GetMesssageRecieveEvent() const; + const std::shared_ptr& GetOperationModeChangedEvent() const; void PushMessage(AppletMessage msg); AppletMessage PopMessage(); std::size_t GetMessageCount() const; diff --git a/src/core/hle/service/am/applets/applets.cpp b/src/core/hle/service/am/applets/applets.cpp index 673ad1f7f..92f995f8f 100644 --- a/src/core/hle/service/am/applets/applets.cpp +++ b/src/core/hle/service/am/applets/applets.cpp @@ -108,15 +108,15 @@ void AppletDataBroker::SignalStateChanged() const { state_changed_event.writable->Signal(); } -Kernel::SharedPtr AppletDataBroker::GetNormalDataEvent() const { +std::shared_ptr AppletDataBroker::GetNormalDataEvent() const { return pop_out_data_event.readable; } -Kernel::SharedPtr AppletDataBroker::GetInteractiveDataEvent() const { +std::shared_ptr AppletDataBroker::GetInteractiveDataEvent() const { return pop_interactive_out_data_event.readable; } -Kernel::SharedPtr AppletDataBroker::GetStateChangedEvent() const { +std::shared_ptr AppletDataBroker::GetStateChangedEvent() const { return state_changed_event.readable; } diff --git a/src/core/hle/service/am/applets/applets.h b/src/core/hle/service/am/applets/applets.h index 226be88b1..16e61fc6f 100644 --- a/src/core/hle/service/am/applets/applets.h +++ b/src/core/hle/service/am/applets/applets.h @@ -86,9 +86,9 @@ public: void SignalStateChanged() const; - Kernel::SharedPtr GetNormalDataEvent() const; - Kernel::SharedPtr GetInteractiveDataEvent() const; - Kernel::SharedPtr GetStateChangedEvent() const; + std::shared_ptr GetNormalDataEvent() const; + std::shared_ptr GetInteractiveDataEvent() const; + std::shared_ptr GetStateChangedEvent() const; private: // Queues are named from applet's perspective -- cgit v1.2.3