diff options
author | Linus Groh <mail@linusgroh.de> | 2022-07-22 19:43:50 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-07-22 23:09:43 +0100 |
commit | 8150d71821c31a23b5bc59be0b428ffbdf99b9b9 (patch) | |
tree | 61bb3a4dc83a79971b0959fc2e0870cc987dc2ec | |
parent | 5a106b6401fa456a10e0402895db3be3f7d91358 (diff) | |
download | serenity-8150d71821c31a23b5bc59be0b428ffbdf99b9b9.zip |
Everywhere: Prefix 'TYPEDEF_DISTINCT_ORDERED_ID' with 'AK_'
-rw-r--r-- | AK/DistinctNumeric.h | 2 | ||||
-rw-r--r-- | Kernel/Bus/PCI/Controller/HostController.h | 6 | ||||
-rw-r--r-- | Kernel/Bus/PCI/Definitions.h | 19 | ||||
-rw-r--r-- | Kernel/FileSystem/BlockBasedFileSystem.h | 2 | ||||
-rw-r--r-- | Kernel/FileSystem/DeviceFileTypes.h | 4 | ||||
-rw-r--r-- | Kernel/FileSystem/Ext2FileSystem.h | 2 | ||||
-rw-r--r-- | Kernel/FileSystem/InodeIdentifier.h | 4 | ||||
-rw-r--r-- | Kernel/Forward.h | 12 | ||||
-rw-r--r-- | Kernel/Graphics/Bochs/DisplayConnector.h | 2 | ||||
-rw-r--r-- | Kernel/Graphics/VirtIOGPU/Protocol.h | 6 | ||||
-rw-r--r-- | Kernel/TimerQueue.h | 2 | ||||
-rw-r--r-- | Userland/Demos/VirGLDemo/VirGLProtocol.h | 4 | ||||
-rw-r--r-- | Userland/Libraries/LibThreading/Thread.h | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibWasm/Opcode.h | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibWasm/Types.h | 18 |
15 files changed, 44 insertions, 43 deletions
diff --git a/AK/DistinctNumeric.h b/AK/DistinctNumeric.h index 825639b37c..2c41ce4711 100644 --- a/AK/DistinctNumeric.h +++ b/AK/DistinctNumeric.h @@ -286,7 +286,7 @@ struct Formatter<DistinctNumeric<T, X, Incr, Cmp, Bool, Flags, Shift, Arith>> : #define AK_TYPEDEF_DISTINCT_NUMERIC_GENERAL(T, Incr, Cmp, Bool, Flags, Shift, Arith, NAME) \ using NAME = DistinctNumeric<T, struct __##NAME##_tag, Incr, Cmp, Bool, Flags, Shift, Arith>; -#define TYPEDEF_DISTINCT_ORDERED_ID(T, NAME) AK_TYPEDEF_DISTINCT_NUMERIC_GENERAL(T, false, true, true, false, false, false, NAME) +#define AK_TYPEDEF_DISTINCT_ORDERED_ID(T, NAME) AK_TYPEDEF_DISTINCT_NUMERIC_GENERAL(T, false, true, true, false, false, false, NAME) // TODO: Further type aliases? template<typename T, typename X, auto... Args> diff --git a/Kernel/Bus/PCI/Controller/HostController.h b/Kernel/Bus/PCI/Controller/HostController.h index 9089fde3e9..512e08e446 100644 --- a/Kernel/Bus/PCI/Controller/HostController.h +++ b/Kernel/Bus/PCI/Controller/HostController.h @@ -13,9 +13,9 @@ namespace Kernel::PCI { -TYPEDEF_DISTINCT_ORDERED_ID(u8, BusNumber); -TYPEDEF_DISTINCT_ORDERED_ID(u8, DeviceNumber); -TYPEDEF_DISTINCT_ORDERED_ID(u8, FunctionNumber); +AK_TYPEDEF_DISTINCT_ORDERED_ID(u8, BusNumber); +AK_TYPEDEF_DISTINCT_ORDERED_ID(u8, DeviceNumber); +AK_TYPEDEF_DISTINCT_ORDERED_ID(u8, FunctionNumber); class HostController { public: diff --git a/Kernel/Bus/PCI/Definitions.h b/Kernel/Bus/PCI/Definitions.h index 96b72b6de8..039edc6584 100644 --- a/Kernel/Bus/PCI/Definitions.h +++ b/Kernel/Bus/PCI/Definitions.h @@ -97,7 +97,8 @@ enum class SubclassID { } -TYPEDEF_DISTINCT_ORDERED_ID(u8, CapabilityID); +AK_TYPEDEF_DISTINCT_ORDERED_ID(u8, CapabilityID); + namespace Capabilities { enum ID { Null = 0x0, @@ -218,14 +219,14 @@ private: const u8 m_ptr; }; -TYPEDEF_DISTINCT_ORDERED_ID(u8, ClassCode); -TYPEDEF_DISTINCT_ORDERED_ID(u8, SubclassCode); -TYPEDEF_DISTINCT_ORDERED_ID(u8, ProgrammingInterface); -TYPEDEF_DISTINCT_ORDERED_ID(u8, RevisionID); -TYPEDEF_DISTINCT_ORDERED_ID(u16, SubsystemID); -TYPEDEF_DISTINCT_ORDERED_ID(u16, SubsystemVendorID); -TYPEDEF_DISTINCT_ORDERED_ID(u8, InterruptLine); -TYPEDEF_DISTINCT_ORDERED_ID(u8, InterruptPin); +AK_TYPEDEF_DISTINCT_ORDERED_ID(u8, ClassCode); +AK_TYPEDEF_DISTINCT_ORDERED_ID(u8, SubclassCode); +AK_TYPEDEF_DISTINCT_ORDERED_ID(u8, ProgrammingInterface); +AK_TYPEDEF_DISTINCT_ORDERED_ID(u8, RevisionID); +AK_TYPEDEF_DISTINCT_ORDERED_ID(u16, SubsystemID); +AK_TYPEDEF_DISTINCT_ORDERED_ID(u16, SubsystemVendorID); +AK_TYPEDEF_DISTINCT_ORDERED_ID(u8, InterruptLine); +AK_TYPEDEF_DISTINCT_ORDERED_ID(u8, InterruptPin); class Access; class DeviceIdentifier { diff --git a/Kernel/FileSystem/BlockBasedFileSystem.h b/Kernel/FileSystem/BlockBasedFileSystem.h index 5a11fbc8cb..47a25ec8f2 100644 --- a/Kernel/FileSystem/BlockBasedFileSystem.h +++ b/Kernel/FileSystem/BlockBasedFileSystem.h @@ -13,7 +13,7 @@ namespace Kernel { class BlockBasedFileSystem : public FileBackedFileSystem { public: - TYPEDEF_DISTINCT_ORDERED_ID(u64, BlockIndex); + AK_TYPEDEF_DISTINCT_ORDERED_ID(u64, BlockIndex); virtual ~BlockBasedFileSystem() override; virtual ErrorOr<void> initialize() override; diff --git a/Kernel/FileSystem/DeviceFileTypes.h b/Kernel/FileSystem/DeviceFileTypes.h index 14e13e2a75..5b2a154557 100644 --- a/Kernel/FileSystem/DeviceFileTypes.h +++ b/Kernel/FileSystem/DeviceFileTypes.h @@ -10,7 +10,7 @@ namespace Kernel { -TYPEDEF_DISTINCT_ORDERED_ID(unsigned, MajorNumber); -TYPEDEF_DISTINCT_ORDERED_ID(unsigned, MinorNumber); +AK_TYPEDEF_DISTINCT_ORDERED_ID(unsigned, MajorNumber); +AK_TYPEDEF_DISTINCT_ORDERED_ID(unsigned, MinorNumber); } diff --git a/Kernel/FileSystem/Ext2FileSystem.h b/Kernel/FileSystem/Ext2FileSystem.h index d407d21b12..c9ca4569a9 100644 --- a/Kernel/FileSystem/Ext2FileSystem.h +++ b/Kernel/FileSystem/Ext2FileSystem.h @@ -105,7 +105,7 @@ public: FeaturesReadOnly get_features_readonly() const; private: - TYPEDEF_DISTINCT_ORDERED_ID(unsigned, GroupIndex); + AK_TYPEDEF_DISTINCT_ORDERED_ID(unsigned, GroupIndex); explicit Ext2FS(OpenFileDescription&); diff --git a/Kernel/FileSystem/InodeIdentifier.h b/Kernel/FileSystem/InodeIdentifier.h index 2e00f1c8cc..f99a93e3b2 100644 --- a/Kernel/FileSystem/InodeIdentifier.h +++ b/Kernel/FileSystem/InodeIdentifier.h @@ -15,8 +15,8 @@ namespace Kernel { class FileSystem; struct InodeMetadata; -TYPEDEF_DISTINCT_ORDERED_ID(u32, FileSystemID); -TYPEDEF_DISTINCT_ORDERED_ID(u64, InodeIndex); +AK_TYPEDEF_DISTINCT_ORDERED_ID(u32, FileSystemID); +AK_TYPEDEF_DISTINCT_ORDERED_ID(u64, InodeIndex); class InodeIdentifier { public: diff --git a/Kernel/Forward.h b/Kernel/Forward.h index 2362940352..a82e12963c 100644 --- a/Kernel/Forward.h +++ b/Kernel/Forward.h @@ -92,12 +92,12 @@ class SpinlockLocker; struct InodeMetadata; struct TrapFrame; -TYPEDEF_DISTINCT_ORDERED_ID(pid_t, ProcessID); -TYPEDEF_DISTINCT_ORDERED_ID(pid_t, ThreadID); -TYPEDEF_DISTINCT_ORDERED_ID(pid_t, SessionID); -TYPEDEF_DISTINCT_ORDERED_ID(pid_t, ProcessGroupID); +AK_TYPEDEF_DISTINCT_ORDERED_ID(pid_t, ProcessID); +AK_TYPEDEF_DISTINCT_ORDERED_ID(pid_t, ThreadID); +AK_TYPEDEF_DISTINCT_ORDERED_ID(pid_t, SessionID); +AK_TYPEDEF_DISTINCT_ORDERED_ID(pid_t, ProcessGroupID); -TYPEDEF_DISTINCT_ORDERED_ID(uid_t, UserID); -TYPEDEF_DISTINCT_ORDERED_ID(gid_t, GroupID); +AK_TYPEDEF_DISTINCT_ORDERED_ID(uid_t, UserID); +AK_TYPEDEF_DISTINCT_ORDERED_ID(gid_t, GroupID); } diff --git a/Kernel/Graphics/Bochs/DisplayConnector.h b/Kernel/Graphics/Bochs/DisplayConnector.h index a8d4277e0d..6f73484763 100644 --- a/Kernel/Graphics/Bochs/DisplayConnector.h +++ b/Kernel/Graphics/Bochs/DisplayConnector.h @@ -22,7 +22,7 @@ class BochsDisplayConnector friend class DeviceManagement; public: - TYPEDEF_DISTINCT_ORDERED_ID(u16, IndexID); + AK_TYPEDEF_DISTINCT_ORDERED_ID(u16, IndexID); static NonnullRefPtr<BochsDisplayConnector> must_create(PhysicalAddress framebuffer_address, size_t framebuffer_resource_size, bool virtual_box_hardware); diff --git a/Kernel/Graphics/VirtIOGPU/Protocol.h b/Kernel/Graphics/VirtIOGPU/Protocol.h index 374fab657c..16538da1f0 100644 --- a/Kernel/Graphics/VirtIOGPU/Protocol.h +++ b/Kernel/Graphics/VirtIOGPU/Protocol.h @@ -11,9 +11,9 @@ #define VIRTIO_GPU_MAX_SCANOUTS 16 namespace Kernel::Graphics::VirtIOGPU { -TYPEDEF_DISTINCT_ORDERED_ID(u32, ContextID); -TYPEDEF_DISTINCT_ORDERED_ID(u32, ResourceID); -TYPEDEF_DISTINCT_ORDERED_ID(u32, ScanoutID); +AK_TYPEDEF_DISTINCT_ORDERED_ID(u32, ContextID); +AK_TYPEDEF_DISTINCT_ORDERED_ID(u32, ResourceID); +AK_TYPEDEF_DISTINCT_ORDERED_ID(u32, ScanoutID); }; #define VREND_MAX_CTX 64 diff --git a/Kernel/TimerQueue.h b/Kernel/TimerQueue.h index a9e59bd774..9b982e4669 100644 --- a/Kernel/TimerQueue.h +++ b/Kernel/TimerQueue.h @@ -16,7 +16,7 @@ namespace Kernel { -TYPEDEF_DISTINCT_ORDERED_ID(u64, TimerId); +AK_TYPEDEF_DISTINCT_ORDERED_ID(u64, TimerId); class Timer : public RefCounted<Timer> { friend class TimerQueue; diff --git a/Userland/Demos/VirGLDemo/VirGLProtocol.h b/Userland/Demos/VirGLDemo/VirGLProtocol.h index 21d9da96bc..15d4afa583 100644 --- a/Userland/Demos/VirGLDemo/VirGLProtocol.h +++ b/Userland/Demos/VirGLDemo/VirGLProtocol.h @@ -8,8 +8,8 @@ #include <AK/DistinctNumeric.h> -TYPEDEF_DISTINCT_ORDERED_ID(u32, ObjectHandle); -TYPEDEF_DISTINCT_ORDERED_ID(u32, ResourceID); +AK_TYPEDEF_DISTINCT_ORDERED_ID(u32, ObjectHandle); +AK_TYPEDEF_DISTINCT_ORDERED_ID(u32, ResourceID); #define VIRGL_BIND_DEPTH_STENCIL (1 << 0) #define VIRGL_BIND_RENDER_TARGET (1 << 1) diff --git a/Userland/Libraries/LibThreading/Thread.h b/Userland/Libraries/LibThreading/Thread.h index dec19c248a..d1e1aa9b7a 100644 --- a/Userland/Libraries/LibThreading/Thread.h +++ b/Userland/Libraries/LibThreading/Thread.h @@ -16,7 +16,7 @@ namespace Threading { -TYPEDEF_DISTINCT_ORDERED_ID(intptr_t, ThreadError); +AK_TYPEDEF_DISTINCT_ORDERED_ID(intptr_t, ThreadError); class Thread final : public Core::Object { C_OBJECT(Thread); diff --git a/Userland/Libraries/LibWasm/Opcode.h b/Userland/Libraries/LibWasm/Opcode.h index 9976314a88..0dda2b7f44 100644 --- a/Userland/Libraries/LibWasm/Opcode.h +++ b/Userland/Libraries/LibWasm/Opcode.h @@ -10,7 +10,7 @@ namespace Wasm { -TYPEDEF_DISTINCT_ORDERED_ID(u32, OpCode); +AK_TYPEDEF_DISTINCT_ORDERED_ID(u32, OpCode); namespace Instructions { diff --git a/Userland/Libraries/LibWasm/Types.h b/Userland/Libraries/LibWasm/Types.h index 844cfe996b..3725cb0425 100644 --- a/Userland/Libraries/LibWasm/Types.h +++ b/Userland/Libraries/LibWasm/Types.h @@ -48,15 +48,15 @@ String parse_error_to_string(ParseError); template<typename T> using ParseResult = Result<T, ParseError>; -TYPEDEF_DISTINCT_ORDERED_ID(size_t, TypeIndex); -TYPEDEF_DISTINCT_ORDERED_ID(size_t, FunctionIndex); -TYPEDEF_DISTINCT_ORDERED_ID(size_t, TableIndex); -TYPEDEF_DISTINCT_ORDERED_ID(size_t, ElementIndex); -TYPEDEF_DISTINCT_ORDERED_ID(size_t, MemoryIndex); -TYPEDEF_DISTINCT_ORDERED_ID(size_t, LocalIndex); -TYPEDEF_DISTINCT_ORDERED_ID(size_t, GlobalIndex); -TYPEDEF_DISTINCT_ORDERED_ID(size_t, LabelIndex); -TYPEDEF_DISTINCT_ORDERED_ID(size_t, DataIndex); +AK_TYPEDEF_DISTINCT_ORDERED_ID(size_t, TypeIndex); +AK_TYPEDEF_DISTINCT_ORDERED_ID(size_t, FunctionIndex); +AK_TYPEDEF_DISTINCT_ORDERED_ID(size_t, TableIndex); +AK_TYPEDEF_DISTINCT_ORDERED_ID(size_t, ElementIndex); +AK_TYPEDEF_DISTINCT_ORDERED_ID(size_t, MemoryIndex); +AK_TYPEDEF_DISTINCT_ORDERED_ID(size_t, LocalIndex); +AK_TYPEDEF_DISTINCT_ORDERED_ID(size_t, GlobalIndex); +AK_TYPEDEF_DISTINCT_ORDERED_ID(size_t, LabelIndex); +AK_TYPEDEF_DISTINCT_ORDERED_ID(size_t, DataIndex); AK_TYPEDEF_DISTINCT_NUMERIC_GENERAL(u64, true, true, false, true, false, true, InstructionPointer); ParseError with_eof_check(InputStream const& stream, ParseError error_if_not_eof); |