summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/k_session_request.cpp
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-03-13 14:16:16 +0100
committerGitHub <noreply@github.com>2023-03-13 14:16:16 +0100
commit1f952f6ac9e3aca3dba8e4286fe937616081a767 (patch)
treeca57513605bdef4767762614c074ca90b7791575 /src/core/hle/kernel/k_session_request.cpp
parentMerge pull request #9942 from liamwhite/speling (diff)
parentkernel: additional style fixes to KThread, KProcess (diff)
downloadyuzu-1f952f6ac9e3aca3dba8e4286fe937616081a767.tar
yuzu-1f952f6ac9e3aca3dba8e4286fe937616081a767.tar.gz
yuzu-1f952f6ac9e3aca3dba8e4286fe937616081a767.tar.bz2
yuzu-1f952f6ac9e3aca3dba8e4286fe937616081a767.tar.lz
yuzu-1f952f6ac9e3aca3dba8e4286fe937616081a767.tar.xz
yuzu-1f952f6ac9e3aca3dba8e4286fe937616081a767.tar.zst
yuzu-1f952f6ac9e3aca3dba8e4286fe937616081a767.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/k_session_request.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/hle/kernel/k_session_request.cpp b/src/core/hle/kernel/k_session_request.cpp
index 520da6aa7..a329e5690 100644
--- a/src/core/hle/kernel/k_session_request.cpp
+++ b/src/core/hle/kernel/k_session_request.cpp
@@ -14,46 +14,46 @@ Result KSessionRequest::SessionMappings::PushMap(VAddr client, VAddr server, siz
// Get the mapping.
Mapping* mapping;
if (index < NumStaticMappings) {
- mapping = &m_static_mappings[index];
+ mapping = std::addressof(m_static_mappings[index]);
} else {
// Allocate a page for the extra mappings.
if (m_mappings == nullptr) {
- KPageBuffer* page_buffer = KPageBuffer::Allocate(kernel);
+ KPageBuffer* page_buffer = KPageBuffer::Allocate(m_kernel);
R_UNLESS(page_buffer != nullptr, ResultOutOfMemory);
m_mappings = reinterpret_cast<Mapping*>(page_buffer);
}
- mapping = &m_mappings[index - NumStaticMappings];
+ mapping = std::addressof(m_mappings[index - NumStaticMappings]);
}
// Set the mapping.
mapping->Set(client, server, size, state);
- return ResultSuccess;
+ R_SUCCEED();
}
Result KSessionRequest::SessionMappings::PushSend(VAddr client, VAddr server, size_t size,
KMemoryState state) {
ASSERT(m_num_recv == 0);
ASSERT(m_num_exch == 0);
- return this->PushMap(client, server, size, state, m_num_send++);
+ R_RETURN(this->PushMap(client, server, size, state, m_num_send++));
}
Result KSessionRequest::SessionMappings::PushReceive(VAddr client, VAddr server, size_t size,
KMemoryState state) {
ASSERT(m_num_exch == 0);
- return this->PushMap(client, server, size, state, m_num_send + m_num_recv++);
+ R_RETURN(this->PushMap(client, server, size, state, m_num_send + m_num_recv++));
}
Result KSessionRequest::SessionMappings::PushExchange(VAddr client, VAddr server, size_t size,
KMemoryState state) {
- return this->PushMap(client, server, size, state, m_num_send + m_num_recv + m_num_exch++);
+ R_RETURN(this->PushMap(client, server, size, state, m_num_send + m_num_recv + m_num_exch++));
}
void KSessionRequest::SessionMappings::Finalize() {
if (m_mappings) {
- KPageBuffer::Free(kernel, reinterpret_cast<KPageBuffer*>(m_mappings));
+ KPageBuffer::Free(m_kernel, reinterpret_cast<KPageBuffer*>(m_mappings));
m_mappings = nullptr;
}
}