kernel/server_session: Return a std::pair from CreateSessionPair()
Keeps the return type consistent with the function name. While we're at it, we can also reduce the amount of boilerplate involved with handling these by using structured bindings.
This commit is contained in:
parent
1afc2c72d6
commit
42535468c3
7 changed files with 25 additions and 30 deletions
|
@ -24,8 +24,8 @@ TEST_CASE("HLERequestContext::PopulateFromIncomingCommandBuffer", "[core][kernel
|
|||
Core::Timing timing;
|
||||
Memory::MemorySystem memory;
|
||||
Kernel::KernelSystem kernel(memory, timing, [] {}, 0);
|
||||
auto session = std::get<std::shared_ptr<ServerSession>>(kernel.CreateSessionPair());
|
||||
HLERequestContext context(kernel, std::move(session), nullptr);
|
||||
auto [server, client] = kernel.CreateSessionPair();
|
||||
HLERequestContext context(kernel, std::move(server), nullptr);
|
||||
|
||||
auto process = kernel.CreateProcess(kernel.CreateCodeSet("", 0));
|
||||
|
||||
|
@ -236,8 +236,8 @@ TEST_CASE("HLERequestContext::WriteToOutgoingCommandBuffer", "[core][kernel]") {
|
|||
Core::Timing timing;
|
||||
Memory::MemorySystem memory;
|
||||
Kernel::KernelSystem kernel(memory, timing, [] {}, 0);
|
||||
auto session = std::get<std::shared_ptr<ServerSession>>(kernel.CreateSessionPair());
|
||||
HLERequestContext context(kernel, std::move(session), nullptr);
|
||||
auto [server, client] = kernel.CreateSessionPair();
|
||||
HLERequestContext context(kernel, std::move(server), nullptr);
|
||||
|
||||
auto process = kernel.CreateProcess(kernel.CreateCodeSet("", 0));
|
||||
auto* input = context.CommandBuffer();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue