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
commit 752de9cd27
Notes: sideshowbarker 2024-07-19 12:45:36 +09:00
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()