From 0d79e57c4daec516cef064f4cbbb8a3e17962f9f Mon Sep 17 00:00:00 2001 From: Ben Wiederhake Date: Sat, 12 Sep 2020 00:44:54 +0200 Subject: [PATCH] Kernel: Fix various forward declarations I decided to modify MappedROM.h because all other entried in Forward.h are also classes, and this is visually more pleasing. Other than that, it just doesn't make any difference which way we resolve the conflicts. --- Kernel/FileSystem/VirtualFileSystem.h | 2 +- Kernel/Thread.h | 2 +- Kernel/VM/MappedROM.h | 3 ++- Libraries/LibDebug/Dwarf/Expression.h | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Kernel/FileSystem/VirtualFileSystem.h b/Kernel/FileSystem/VirtualFileSystem.h index 19693276987..f3f2ddad760 100644 --- a/Kernel/FileSystem/VirtualFileSystem.h +++ b/Kernel/FileSystem/VirtualFileSystem.h @@ -43,7 +43,7 @@ namespace Kernel { class Custody; class Device; class FileDescription; -class UnveiledPath; +struct UnveiledPath; struct UidAndGid { uid_t uid; diff --git a/Kernel/Thread.h b/Kernel/Thread.h index f6c1a189fd3..f8f9d1ded0d 100644 --- a/Kernel/Thread.h +++ b/Kernel/Thread.h @@ -530,7 +530,7 @@ private: IntrusiveListNode m_wait_queue_node; private: - friend class SchedulerData; + friend struct SchedulerData; friend class WaitQueue; bool unlock_process_if_locked(); void relock_process(bool did_unlock); diff --git a/Kernel/VM/MappedROM.h b/Kernel/VM/MappedROM.h index 9be57c2f451..26caff10d85 100644 --- a/Kernel/VM/MappedROM.h +++ b/Kernel/VM/MappedROM.h @@ -31,7 +31,8 @@ namespace Kernel { -struct MappedROM { +class MappedROM { +public: const u8* base() const { return region->vaddr().offset(offset).as_ptr(); } const u8* end() const { return base() + size; } OwnPtr region; diff --git a/Libraries/LibDebug/Dwarf/Expression.h b/Libraries/LibDebug/Dwarf/Expression.h index fedc636c839..ef138303533 100644 --- a/Libraries/LibDebug/Dwarf/Expression.h +++ b/Libraries/LibDebug/Dwarf/Expression.h @@ -29,7 +29,7 @@ #include "AK/ByteBuffer.h" #include "AK/Types.h" -class PtraceRegisters; +struct PtraceRegisters; namespace Debug::Dwarf::Expression {