mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 07:25:07 +00:00
FileDescription: Disallow construction with a null File
It's not valid for a FileDescription to not have a file, so let's disallow it by taking a File& (or FIFO&) in the constructor.
This commit is contained in:
parent
0dc05a33c1
commit
752de9cd27
6 changed files with 18 additions and 19 deletions
|
@ -32,7 +32,7 @@ NonnullRefPtr<FIFO> FIFO::create(uid_t uid)
|
|||
|
||||
NonnullRefPtr<FileDescription> FIFO::open_direction(FIFO::Direction direction)
|
||||
{
|
||||
auto description = FileDescription::create(this);
|
||||
auto description = FileDescription::create(*this);
|
||||
attach(direction);
|
||||
description->set_fifo_direction({}, direction);
|
||||
return description;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue