mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 13:37:44 +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:
parent
3796d417e0
commit
b3e9a4e603
19 changed files with 62 additions and 50 deletions
|
@ -18,9 +18,6 @@ class Endpoint : public Core::Object {
|
|||
public:
|
||||
virtual ~Endpoint() override { }
|
||||
|
||||
Endpoint() { }
|
||||
Endpoint(NonnullRefPtr<Core::IODevice> in, NonnullRefPtr<Core::IODevice> out);
|
||||
|
||||
virtual void handle_uci() { }
|
||||
virtual void handle_debug(const DebugCommand&) { }
|
||||
virtual void handle_isready() { }
|
||||
|
@ -48,6 +45,10 @@ public:
|
|||
}
|
||||
void set_out(RefPtr<Core::IODevice> out) { m_out = out; }
|
||||
|
||||
protected:
|
||||
Endpoint() { }
|
||||
Endpoint(NonnullRefPtr<Core::IODevice> in, NonnullRefPtr<Core::IODevice> out);
|
||||
|
||||
private:
|
||||
void set_in_notifier();
|
||||
NonnullOwnPtr<Command> read_command();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue