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()