diff options
author | Gunnar Beutner <gbeutner@serenityos.org> | 2021-05-02 04:39:36 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-05-02 08:11:38 +0200 |
commit | 7cf2839a262a38e00f110bee1102020c658ac476 (patch) | |
tree | a94b0916c48de61beb76171d85f6c113903090dd /Userland/Libraries/LibProtocol | |
parent | 1a015dc379b81cde5a7ee1518f4704320ed736a2 (diff) | |
download | serenity-7cf2839a262a38e00f110bee1102020c658ac476.zip |
Userland: Get rid of the OwnPtr<...> boilerplate code for IPC handlers
Diffstat (limited to 'Userland/Libraries/LibProtocol')
-rw-r--r-- | Userland/Libraries/LibProtocol/RequestClient.cpp | 4 | ||||
-rw-r--r-- | Userland/Libraries/LibProtocol/RequestClient.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibProtocol/RequestClient.cpp b/Userland/Libraries/LibProtocol/RequestClient.cpp index 44a1a98b8d..477a1e2921 100644 --- a/Userland/Libraries/LibProtocol/RequestClient.cpp +++ b/Userland/Libraries/LibProtocol/RequestClient.cpp @@ -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 {}; } } diff --git a/Userland/Libraries/LibProtocol/RequestClient.h b/Userland/Libraries/LibProtocol/RequestClient.h index 269f0d97ad..176187222d 100644 --- a/Userland/Libraries/LibProtocol/RequestClient.h +++ b/Userland/Libraries/LibProtocol/RequestClient.h @@ -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; |