1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 00:37:35 +00:00

Libraries: 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.
This commit is contained in:
Ben Wiederhake 2021-10-31 23:38:04 +01:00 committed by Andreas Kling
parent 3796d417e0
commit b3e9a4e603
19 changed files with 62 additions and 50 deletions

View file

@ -19,8 +19,6 @@ class ClientConnection final
, public AudioClientEndpoint {
C_OBJECT(ClientConnection)
public:
ClientConnection();
void enqueue(Buffer const&);
bool try_enqueue(Buffer const&);
void async_enqueue(Buffer const&);
@ -31,6 +29,8 @@ public:
Function<void(double volume)> on_client_volume_change;
private:
ClientConnection();
virtual void finished_playing_buffer(i32) override;
virtual void muted_state_changed(bool) override;
virtual void main_mix_volume_changed(double) override;