diff options
author | Lioncash <mathew1800@gmail.com> | 2018-10-29 23:20:17 -0400 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-10-29 23:28:04 -0400 |
commit | 6383653a8df93d3daa1d5b8e1e694905684ccbda (patch) | |
tree | bba8b85a3aacf904bb5b1a18a87f69b586f0bca7 /src/core/hle/kernel | |
parent | 0cc347462d3a6992a6d66ccd69629a71cd500cb3 (diff) |
hle_ipc: Add member function for querying the existence of a domain header
Gets rid of the need to call the getter and then check for null.
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r-- | src/core/hle/kernel/hle_ipc.h | 4 | ||||
-rw-r--r-- | src/core/hle/kernel/server_session.cpp | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/core/hle/kernel/hle_ipc.h b/src/core/hle/kernel/hle_ipc.h index 2e49826a8..a38e34b74 100644 --- a/src/core/hle/kernel/hle_ipc.h +++ b/src/core/hle/kernel/hle_ipc.h @@ -165,6 +165,10 @@ public: return domain_message_header.get(); } + bool HasDomainMessageHeader() const { + return domain_message_header != nullptr; + } + /// Helper function to read a buffer using the appropriate buffer descriptor std::vector<u8> ReadBuffer(int buffer_index = 0) const; diff --git a/src/core/hle/kernel/server_session.cpp b/src/core/hle/kernel/server_session.cpp index afb3beed2..80897f3a4 100644 --- a/src/core/hle/kernel/server_session.cpp +++ b/src/core/hle/kernel/server_session.cpp @@ -111,7 +111,7 @@ ResultCode ServerSession::HandleSyncRequest(SharedPtr<Thread> thread) { ResultCode result = RESULT_SUCCESS; // If the session has been converted to a domain, handle the domain request - if (IsDomain() && context.GetDomainMessageHeader()) { + if (IsDomain() && context.HasDomainMessageHeader()) { result = HandleDomainSyncRequest(context); // If there is no domain header, the regular session handler is used } else if (hle_handler != nullptr) { |