mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-02 22:04:42 +00:00
Kernel: Remove FIFO::{attach,detach}(Direction)
These functions would have caused a `-Woverloaded-virtual` warning with
GCC 13, as they shadow `File::{attach,detach}(OpenFileDescription&)`.
Both of these functions had a single call site. This commit inlines
`attach` into its only caller, `FIFO::open_direction`.
Instead of explicitly checking `is_fifo()` in `~OpenFileDescription`
before running the `detach(Direction)` overload, let's just override the
regular `detach(OpenFileDescription&)` for `FIFO` to perform this action
instead.
This commit is contained in:
committed by
Andreas Kling
parent
f666989c9e
commit
2123fdd678
@@ -53,8 +53,6 @@ OpenFileDescription::OpenFileDescription(File& file)
|
||||
OpenFileDescription::~OpenFileDescription()
|
||||
{
|
||||
m_file->detach(*this);
|
||||
if (is_fifo())
|
||||
static_cast<FIFO*>(m_file.ptr())->detach(fifo_direction());
|
||||
// FIXME: Should this error path be observed somehow?
|
||||
(void)m_file->close();
|
||||
if (m_inode)
|
||||
|
||||
Reference in New Issue
Block a user