From 1b2ef8582cfa33eb3f0d605dc5cf67bf6a05a017 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 4 Nov 2019 14:03:14 +0100 Subject: 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. --- Kernel/Devices/FloppyDiskDevice.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Kernel/Devices/FloppyDiskDevice.h') diff --git a/Kernel/Devices/FloppyDiskDevice.h b/Kernel/Devices/FloppyDiskDevice.h index 0b35f47fb7..7afc0e49f1 100644 --- a/Kernel/Devices/FloppyDiskDevice.h +++ b/Kernel/Devices/FloppyDiskDevice.h @@ -143,9 +143,9 @@ public: // ^BlockDevice virtual ssize_t read(FileDescription&, u8*, ssize_t) override { return 0; } - virtual bool can_read(FileDescription&) const override { return true; } + virtual bool can_read(const FileDescription&) const override { return true; } virtual ssize_t write(FileDescription&, const u8*, ssize_t) override { return 0; } - virtual bool can_write(FileDescription&) const override { return true; } + virtual bool can_write(const FileDescription&) const override { return true; } protected: explicit FloppyDiskDevice(DriveType); -- cgit v1.2.3