summaryrefslogtreecommitdiff
path: root/Userland/DevTools/HackStudio/LanguageServers
diff options
context:
space:
mode:
authorBen Wiederhake <BenWiederhake.GitHub@gmx.de>2021-10-31 23:38:04 +0100
committerAndreas Kling <kling@serenityos.org>2021-11-02 22:56:53 +0100
commit3796d417e00599c263c69ebf1ef4c0dcc52261a7 (patch)
tree3e81c30a95d1eafe3218dccc6d4a318290582cb1 /Userland/DevTools/HackStudio/LanguageServers
parent465af4c4d4f403909208a420c21dbf7cf9cc015d (diff)
downloadserenity-3796d417e00599c263c69ebf1ef4c0dcc52261a7.zip
Demos+DevTools+Games: 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/DevTools/HackStudio/LanguageServers')
-rw-r--r--Userland/DevTools/HackStudio/LanguageServers/Cpp/ClientConnection.h2
-rw-r--r--Userland/DevTools/HackStudio/LanguageServers/Shell/ClientConnection.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/Userland/DevTools/HackStudio/LanguageServers/Cpp/ClientConnection.h b/Userland/DevTools/HackStudio/LanguageServers/Cpp/ClientConnection.h
index 5c88f59ac0..f67e888015 100644
--- a/Userland/DevTools/HackStudio/LanguageServers/Cpp/ClientConnection.h
+++ b/Userland/DevTools/HackStudio/LanguageServers/Cpp/ClientConnection.h
@@ -14,7 +14,7 @@ namespace LanguageServers::Cpp {
class ClientConnection final : public LanguageServers::ClientConnection {
C_OBJECT(ClientConnection);
-public:
+private:
ClientConnection(NonnullRefPtr<Core::LocalSocket> socket, int client_id)
: LanguageServers::ClientConnection(move(socket), client_id)
{
diff --git a/Userland/DevTools/HackStudio/LanguageServers/Shell/ClientConnection.h b/Userland/DevTools/HackStudio/LanguageServers/Shell/ClientConnection.h
index 285f01920e..3eb2adbde6 100644
--- a/Userland/DevTools/HackStudio/LanguageServers/Shell/ClientConnection.h
+++ b/Userland/DevTools/HackStudio/LanguageServers/Shell/ClientConnection.h
@@ -15,6 +15,7 @@ namespace LanguageServers::Shell {
class ClientConnection final : public LanguageServers::ClientConnection {
C_OBJECT(ClientConnection);
+private:
ClientConnection(NonnullRefPtr<Core::LocalSocket> socket, int client_id)
: LanguageServers::ClientConnection(move(socket), client_id)
{