summaryrefslogtreecommitdiff
path: root/Kernel/FileSystem/InodeFile.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-11-04 14:03:14 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-11-04 14:03:14 +0100
commit1b2ef8582cfa33eb3f0d605dc5cf67bf6a05a017 (patch)
tree5bc55aac359d06d4978052e63c92b61e0c3854ac /Kernel/FileSystem/InodeFile.h
parente8fee92357fb2dc28140cb8ec62fbdce5f95dac7 (diff)
downloadserenity-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/FileSystem/InodeFile.h')
-rw-r--r--Kernel/FileSystem/InodeFile.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/FileSystem/InodeFile.h b/Kernel/FileSystem/InodeFile.h
index b2ee30c196..c7def9be45 100644
--- a/Kernel/FileSystem/InodeFile.h
+++ b/Kernel/FileSystem/InodeFile.h
@@ -16,8 +16,8 @@ public:
const Inode& inode() const { return *m_inode; }
Inode& inode() { return *m_inode; }
- virtual bool can_read(FileDescription&) const override { return true; }
- virtual bool can_write(FileDescription&) const override { return true; }
+ virtual bool can_read(const FileDescription&) const override { return true; }
+ virtual bool can_write(const FileDescription&) const override { return true; }
virtual ssize_t read(FileDescription&, u8*, ssize_t) override;
virtual ssize_t write(FileDescription&, const u8*, ssize_t) override;