1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-30 13:58:11 +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:
Andreas Kling 2019-08-11 09:32:21 +02:00
parent 0dc05a33c1
commit 752de9cd27
6 changed files with 18 additions and 19 deletions

View file

@ -12,7 +12,7 @@ File::~File()
KResultOr<NonnullRefPtr<FileDescription>> File::open(int options)
{
UNUSED_PARAM(options);
return FileDescription::create(this);
return FileDescription::create(*this);
}
void File::close()