diff options
author | Ben Wiederhake <BenWiederhake.GitHub@gmx.de> | 2021-10-31 23:38:04 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-11-02 22:56:53 +0100 |
commit | 4e55d649d72055f817439f5db8517c9af9cab44a (patch) | |
tree | 9307cdf2c618afd6fd68e601c78414ff553c2280 /Userland/Services/LookupServer | |
parent | b3e9a4e603ce6371e7c1a092bd70e5f367384c4b (diff) | |
download | serenity-4e55d649d72055f817439f5db8517c9af9cab44a.zip |
Services: Fix visibility of Object-derivative constructors
Derivatives of Core::Object should be constructed through
ClassName::construct(), to avoid handling ref-counted objects with
refcount zero. Fixing the visibility means that misuses like this are
more difficult.
Diffstat (limited to 'Userland/Services/LookupServer')
-rw-r--r-- | Userland/Services/LookupServer/ClientConnection.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Services/LookupServer/ClientConnection.h b/Userland/Services/LookupServer/ClientConnection.h index a7f465be30..60bd8697a4 100644 --- a/Userland/Services/LookupServer/ClientConnection.h +++ b/Userland/Services/LookupServer/ClientConnection.h @@ -18,12 +18,13 @@ class ClientConnection final C_OBJECT(ClientConnection); public: - explicit ClientConnection(NonnullRefPtr<Core::LocalSocket>, int client_id); virtual ~ClientConnection() override; virtual void die() override; private: + explicit ClientConnection(NonnullRefPtr<Core::LocalSocket>, int client_id); + virtual Messages::LookupServer::LookupNameResponse lookup_name(String const&) override; virtual Messages::LookupServer::LookupAddressResponse lookup_address(String const&) override; }; |