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/Services/Clipboard/ClientConnection.cpp | |
parent | 1a015dc379b81cde5a7ee1518f4704320ed736a2 (diff) | |
download | serenity-7cf2839a262a38e00f110bee1102020c658ac476.zip |
Userland: Get rid of the OwnPtr<...> boilerplate code for IPC handlers
Diffstat (limited to 'Userland/Services/Clipboard/ClientConnection.cpp')
-rw-r--r-- | Userland/Services/Clipboard/ClientConnection.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Services/Clipboard/ClientConnection.cpp b/Userland/Services/Clipboard/ClientConnection.cpp index 4f8130fac2..7f1a909390 100644 --- a/Userland/Services/Clipboard/ClientConnection.cpp +++ b/Userland/Services/Clipboard/ClientConnection.cpp @@ -35,21 +35,21 @@ void ClientConnection::die() s_connections.remove(client_id()); } -OwnPtr<Messages::ClipboardServer::GreetResponse> ClientConnection::handle(const Messages::ClipboardServer::Greet&) +Messages::ClipboardServer::GreetResponse ClientConnection::handle(const Messages::ClipboardServer::Greet&) { - return make<Messages::ClipboardServer::GreetResponse>(); + return {}; } -OwnPtr<Messages::ClipboardServer::SetClipboardDataResponse> ClientConnection::handle(const Messages::ClipboardServer::SetClipboardData& message) +Messages::ClipboardServer::SetClipboardDataResponse ClientConnection::handle(const Messages::ClipboardServer::SetClipboardData& message) { Storage::the().set_data(message.data(), message.mime_type(), message.metadata().entries()); - return make<Messages::ClipboardServer::SetClipboardDataResponse>(); + return {}; } -OwnPtr<Messages::ClipboardServer::GetClipboardDataResponse> ClientConnection::handle(const Messages::ClipboardServer::GetClipboardData&) +Messages::ClipboardServer::GetClipboardDataResponse ClientConnection::handle(const Messages::ClipboardServer::GetClipboardData&) { auto& storage = Storage::the(); - return make<Messages::ClipboardServer::GetClipboardDataResponse>(storage.buffer(), storage.mime_type(), storage.metadata()); + return { storage.buffer(), storage.mime_type(), storage.metadata() }; } void ClientConnection::notify_about_clipboard_change() |