diff options
author | bunnei <bunneidev@gmail.com> | 2019-03-08 22:35:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-08 22:35:57 +0100 |
commit | 9909d40530d74bd57bd2f2450e72530843fbc124 (patch) | |
tree | e1b4b674ca19cb51fc41272321b77f20a32ef364 /src/core/hle/kernel/hle_ipc.h | |
parent | Merge pull request #2209 from lioncash/reorder (diff) | |
parent | kernel/hle_ipc: Convert std::shared_ptr IPC header instances to std::optional (diff) | |
download | yuzu-9909d40530d74bd57bd2f2450e72530843fbc124.tar yuzu-9909d40530d74bd57bd2f2450e72530843fbc124.tar.gz yuzu-9909d40530d74bd57bd2f2450e72530843fbc124.tar.bz2 yuzu-9909d40530d74bd57bd2f2450e72530843fbc124.tar.lz yuzu-9909d40530d74bd57bd2f2450e72530843fbc124.tar.xz yuzu-9909d40530d74bd57bd2f2450e72530843fbc124.tar.zst yuzu-9909d40530d74bd57bd2f2450e72530843fbc124.zip |
Diffstat (limited to 'src/core/hle/kernel/hle_ipc.h')
-rw-r--r-- | src/core/hle/kernel/hle_ipc.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/core/hle/kernel/hle_ipc.h b/src/core/hle/kernel/hle_ipc.h index 0107acea4..2bdd9f02c 100644 --- a/src/core/hle/kernel/hle_ipc.h +++ b/src/core/hle/kernel/hle_ipc.h @@ -6,6 +6,7 @@ #include <array> #include <memory> +#include <optional> #include <string> #include <type_traits> #include <vector> @@ -168,12 +169,12 @@ public: return buffer_c_desciptors; } - const IPC::DomainMessageHeader* GetDomainMessageHeader() const { - return domain_message_header.get(); + const IPC::DomainMessageHeader& GetDomainMessageHeader() const { + return domain_message_header.value(); } bool HasDomainMessageHeader() const { - return domain_message_header != nullptr; + return domain_message_header.has_value(); } /// Helper function to read a buffer using the appropriate buffer descriptor @@ -272,10 +273,10 @@ private: boost::container::small_vector<SharedPtr<Object>, 8> copy_objects; boost::container::small_vector<std::shared_ptr<SessionRequestHandler>, 8> domain_objects; - std::shared_ptr<IPC::CommandHeader> command_header; - std::shared_ptr<IPC::HandleDescriptorHeader> handle_descriptor_header; - std::shared_ptr<IPC::DataPayloadHeader> data_payload_header; - std::shared_ptr<IPC::DomainMessageHeader> domain_message_header; + std::optional<IPC::CommandHeader> command_header; + std::optional<IPC::HandleDescriptorHeader> handle_descriptor_header; + std::optional<IPC::DataPayloadHeader> data_payload_header; + std::optional<IPC::DomainMessageHeader> domain_message_header; std::vector<IPC::BufferDescriptorX> buffer_x_desciptors; std::vector<IPC::BufferDescriptorABW> buffer_a_desciptors; std::vector<IPC::BufferDescriptorABW> buffer_b_desciptors; |