summaryrefslogtreecommitdiff
path: root/Userland/Libraries
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2021-04-20 10:53:31 +0300
committerLinus Groh <mail@linusgroh.de>2021-04-20 10:10:15 +0200
commit28b8a2ec7a2a4cd7193a6cee0c0d0faa2497ccc3 (patch)
tree09155757639e934d4785da53babe530e2457da02 /Userland/Libraries
parenta2b34b7e6bf747d295f33124fc1019413808bb53 (diff)
downloadserenity-28b8a2ec7a2a4cd7193a6cee0c0d0faa2497ccc3.zip
LibIPC: Make Connection::send_sync return a NonnullOwnPtr
Since we VERIFY that we received a response, the response pointer is always non-null.
Diffstat (limited to 'Userland/Libraries')
-rw-r--r--Userland/Libraries/LibIPC/Connection.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibIPC/Connection.h b/Userland/Libraries/LibIPC/Connection.h
index 66bcab9a42..fe0b19f1f7 100644
--- a/Userland/Libraries/LibIPC/Connection.h
+++ b/Userland/Libraries/LibIPC/Connection.h
@@ -118,12 +118,12 @@ public:
}
template<typename RequestType, typename... Args>
- OwnPtr<typename RequestType::ResponseType> send_sync(Args&&... args)
+ NonnullOwnPtr<typename RequestType::ResponseType> send_sync(Args&&... args)
{
post_message(RequestType(forward<Args>(args)...));
auto response = wait_for_specific_endpoint_message<typename RequestType::ResponseType, PeerEndpoint>();
VERIFY(response);
- return response;
+ return response.release_nonnull();
}
template<typename RequestType, typename... Args>