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); -} - }