mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:38:11 +00:00
LibCore: Convert CFile to ObjectPtr
This commit is contained in:
parent
31b38ed88f
commit
8d550c174e
30 changed files with 135 additions and 134 deletions
|
@ -6,11 +6,6 @@
|
|||
class CFile final : public CIODevice {
|
||||
C_OBJECT(CFile)
|
||||
public:
|
||||
CFile(CObject* parent = nullptr)
|
||||
: CIODevice(parent)
|
||||
{
|
||||
}
|
||||
explicit CFile(const StringView&, CObject* parent = nullptr);
|
||||
virtual ~CFile() override;
|
||||
|
||||
String filename() const { return m_filename; }
|
||||
|
@ -25,6 +20,12 @@ public:
|
|||
bool open(int fd, CIODevice::OpenMode, ShouldCloseFileDescription);
|
||||
|
||||
private:
|
||||
CFile(CObject* parent = nullptr)
|
||||
: CIODevice(parent)
|
||||
{
|
||||
}
|
||||
explicit CFile(const StringView&, CObject* parent = nullptr);
|
||||
|
||||
String m_filename;
|
||||
ShouldCloseFileDescription m_should_close_file_descriptor { ShouldCloseFileDescription::Yes };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue