1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:47:47 +00:00

LibCore: Remove ObjectPtr in favor of RefPtr

Now that CObject is fully ref-counted, just use RefPtr everywhere! :^)
This commit is contained in:
Andreas Kling 2019-09-22 00:31:54 +02:00
parent bc319d9e88
commit d6abfbdc5a
71 changed files with 146 additions and 156 deletions

View file

@ -11,7 +11,7 @@
class Client : public RefCounted<Client> {
public:
static NonnullRefPtr<Client> create(int id, ObjectPtr<CTCPSocket> socket, int ptm_fd)
static NonnullRefPtr<Client> create(int id, RefPtr<CTCPSocket> socket, int ptm_fd)
{
return adopt(*new Client(id, move(socket), ptm_fd));
}
@ -19,7 +19,7 @@ public:
Function<void()> on_exit;
protected:
Client(int id, ObjectPtr<CTCPSocket> socket, int ptm_fd);
Client(int id, RefPtr<CTCPSocket> socket, int ptm_fd);
void drain_socket();
void drain_pty();
@ -35,9 +35,9 @@ private:
// client id
int m_id { 0 };
// client resources
ObjectPtr<CTCPSocket> m_socket;
RefPtr<CTCPSocket> m_socket;
Parser m_parser;
// pty resources
int m_ptm_fd { -1 };
ObjectPtr<CNotifier> m_ptm_notifier;
RefPtr<CNotifier> m_ptm_notifier;
};