1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 11:37:34 +00:00

Userland: Get rid of the OwnPtr<...> boilerplate code for IPC handlers

This commit is contained in:
Gunnar Beutner 2021-05-02 04:39:36 +02:00 committed by Andreas Kling
parent 1a015dc379
commit 7cf2839a26
33 changed files with 389 additions and 385 deletions

View file

@ -83,13 +83,13 @@ void RequestClient::handle(const Messages::RequestClient::HeadersBecameAvailable
}
}
OwnPtr<Messages::RequestClient::CertificateRequestedResponse> RequestClient::handle(const Messages::RequestClient::CertificateRequested& message)
Messages::RequestClient::CertificateRequestedResponse RequestClient::handle(const Messages::RequestClient::CertificateRequested& message)
{
if (auto request = const_cast<Request*>(m_requests.get(message.request_id()).value_or(nullptr))) {
request->did_request_certificates({});
}
return make<Messages::RequestClient::CertificateRequestedResponse>();
return {};
}
}

View file

@ -35,7 +35,7 @@ private:
virtual void handle(const Messages::RequestClient::RequestProgress&) override;
virtual void handle(const Messages::RequestClient::RequestFinished&) override;
virtual OwnPtr<Messages::RequestClient::CertificateRequestedResponse> handle(const Messages::RequestClient::CertificateRequested&) override;
virtual Messages::RequestClient::CertificateRequestedResponse handle(const Messages::RequestClient::CertificateRequested&) override;
virtual void handle(const Messages::RequestClient::HeadersBecameAvailable&) override;
HashMap<i32, RefPtr<Request>> m_requests;