yuzu-emu
/
yuzu-mainline
Archived
1
0
Fork 0

k_session_request: Simplify constructor initialization

This commit is contained in:
Lioncash 2022-10-21 01:52:10 -04:00
parent 6b71530fa8
commit 3968faec06
1 changed files with 11 additions and 14 deletions

View File

@ -52,8 +52,7 @@ public:
}; };
public: public:
explicit SessionMappings(KernelCore& kernel_) explicit SessionMappings(KernelCore& kernel_) : kernel(kernel_) {}
: kernel(kernel_), m_mappings(nullptr), m_num_send(), m_num_recv(), m_num_exch() {}
void Initialize() {} void Initialize() {}
void Finalize(); void Finalize();
@ -150,16 +149,14 @@ public:
private: private:
KernelCore& kernel; KernelCore& kernel;
Mapping m_static_mappings[NumStaticMappings]; Mapping m_static_mappings[NumStaticMappings];
Mapping* m_mappings; Mapping* m_mappings{};
u8 m_num_send; u8 m_num_send{};
u8 m_num_recv; u8 m_num_recv{};
u8 m_num_exch; u8 m_num_exch{};
}; };
public: public:
explicit KSessionRequest(KernelCore& kernel_) explicit KSessionRequest(KernelCore& kernel_) : KAutoObject(kernel_), m_mappings(kernel_) {}
: KAutoObject(kernel_), m_mappings(kernel_), m_thread(nullptr), m_server(nullptr),
m_event(nullptr) {}
static KSessionRequest* Create(KernelCore& kernel) { static KSessionRequest* Create(KernelCore& kernel) {
KSessionRequest* req = KSessionRequest::Allocate(kernel); KSessionRequest* req = KSessionRequest::Allocate(kernel);
@ -297,11 +294,11 @@ private:
private: private:
SessionMappings m_mappings; SessionMappings m_mappings;
KThread* m_thread; KThread* m_thread{};
KProcess* m_server; KProcess* m_server{};
KEvent* m_event; KEvent* m_event{};
uintptr_t m_address; uintptr_t m_address{};
size_t m_size; size_t m_size{};
}; };
} // namespace Kernel } // namespace Kernel