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:
@ -83,7 +83,8 @@ public:
|
||||
std::function<void()> prepare_reschedule_callback, u32 system_mode);
|
||||
~KernelSystem();
|
||||
|
||||
using PortPair = std::tuple<std::shared_ptr<ServerPort>, std::shared_ptr<ClientPort>>;
|
||||
using PortPair = std::pair<std::shared_ptr<ServerPort>, std::shared_ptr<ClientPort>>;
|
||||
using SessionPair = std::pair<std::shared_ptr<ServerSession>, std::shared_ptr<ClientSession>>;
|
||||
|
||||
/**
|
||||
* Creates an address arbiter.
|
||||
@ -160,8 +161,8 @@ public:
|
||||
* @param client_port Optional The ClientPort that spawned this session.
|
||||
* @return The created session tuple
|
||||
*/
|
||||
std::tuple<std::shared_ptr<ServerSession>, std::shared_ptr<ClientSession>> CreateSessionPair(
|
||||
const std::string& name = "Unknown", std::shared_ptr<ClientPort> client_port = nullptr);
|
||||
SessionPair CreateSessionPair(const std::string& name = "Unknown",
|
||||
std::shared_ptr<ClientPort> client_port = nullptr);
|
||||
|
||||
ResourceLimitList& ResourceLimit();
|
||||
const ResourceLimitList& ResourceLimit() const;
|
||||
|
Reference in New Issue
Block a user