diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-11-04 14:03:14 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-11-04 14:03:14 +0100 |
commit | 1b2ef8582cfa33eb3f0d605dc5cf67bf6a05a017 (patch) | |
tree | 5bc55aac359d06d4978052e63c92b61e0c3854ac /Kernel/ProcessTracer.h | |
parent | e8fee92357fb2dc28140cb8ec62fbdce5f95dac7 (diff) | |
download | serenity-1b2ef8582cfa33eb3f0d605dc5cf67bf6a05a017.zip |
Kernel: Make File's can_read/can_write take a const FileDescription&
Asking a File if we could possibly read or write it will never mutate
the asking FileDescription&, so it should be const.
Diffstat (limited to 'Kernel/ProcessTracer.h')
-rw-r--r-- | Kernel/ProcessTracer.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/ProcessTracer.h b/Kernel/ProcessTracer.h index cfde92d2f8..5c769f6cfd 100644 --- a/Kernel/ProcessTracer.h +++ b/Kernel/ProcessTracer.h @@ -12,10 +12,10 @@ public: bool is_dead() const { return m_dead; } void set_dead() { m_dead = true; } - virtual bool can_read(FileDescription&) const override { return !m_calls.is_empty() || m_dead; } + virtual bool can_read(const FileDescription&) const override { return !m_calls.is_empty() || m_dead; } virtual int read(FileDescription&, u8*, int) override; - virtual bool can_write(FileDescription&) const override { return true; } + virtual bool can_write(const FileDescription&) const override { return true; } virtual int write(FileDescription&, const u8*, int) override { return -EIO; } virtual String absolute_path(const FileDescription&) const override; |