From baa34ddab5764f637ffbf526aea548ed238d51a1 Mon Sep 17 00:00:00 2001 From: TuxSH Date: Sat, 10 Nov 2018 23:20:04 +0100 Subject: [PATCH] meso: same thing for KEvent --- mesosphere/include/mesosphere/processes/KWritableEvent.hpp | 4 ++-- mesosphere/source/processes/KEvent.cpp | 2 +- mesosphere/source/processes/KWritableEvent.cpp | 5 ----- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/mesosphere/include/mesosphere/processes/KWritableEvent.hpp b/mesosphere/include/mesosphere/processes/KWritableEvent.hpp index c19ebcd4d..bc9b27cd7 100644 --- a/mesosphere/include/mesosphere/processes/KWritableEvent.hpp +++ b/mesosphere/include/mesosphere/processes/KWritableEvent.hpp @@ -22,9 +22,9 @@ class KWritableEvent final : public KAutoObject, public IServer client); - private: + friend class KEvent; + SharedPtr client{}; }; diff --git a/mesosphere/source/processes/KEvent.cpp b/mesosphere/source/processes/KEvent.cpp index d747215ba..0e2030155 100644 --- a/mesosphere/source/processes/KEvent.cpp +++ b/mesosphere/source/processes/KEvent.cpp @@ -11,7 +11,7 @@ KEvent::~KEvent() Result KEvent::Initialize() { SetClientServerParent(); - server.SetClient(&client); + server.client = &client; SetResourceOwner(KCoreContext::GetCurrentInstance().GetCurrentProcess()); return ResultSuccess(); diff --git a/mesosphere/source/processes/KWritableEvent.cpp b/mesosphere/source/processes/KWritableEvent.cpp index 16dfffe0c..ea6c49952 100644 --- a/mesosphere/source/processes/KWritableEvent.cpp +++ b/mesosphere/source/processes/KWritableEvent.cpp @@ -19,9 +19,4 @@ Result KWritableEvent::Clear() return client->Clear(); } -void KWritableEvent::SetClient(SharedPtr client) -{ - this->client = std::move(client); -} - }