mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 12:37:45 +00:00
Add clang-format file
Also run it across the whole tree to get everything using the One True Style. We don't yet run this in an automated fashion as it's a little slow, but there is a snippet to do so in makeall.sh.
This commit is contained in:
parent
c11351ac50
commit
0dc9af5f7e
286 changed files with 3244 additions and 2424 deletions
|
@ -1,10 +1,10 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/Types.h>
|
||||
#include <AK/AKString.h>
|
||||
#include <SharedGraphics/Size.h>
|
||||
#include <Kernel/PhysicalAddress.h>
|
||||
#include <AK/Types.h>
|
||||
#include <Kernel/Devices/BlockDevice.h>
|
||||
#include <Kernel/PhysicalAddress.h>
|
||||
#include <SharedGraphics/Size.h>
|
||||
|
||||
class BXVGADevice final : public BlockDevice {
|
||||
AK_MAKE_ETERNAL
|
||||
|
|
|
@ -10,7 +10,10 @@ public:
|
|||
virtual bool is_seekable() const override { return true; }
|
||||
|
||||
protected:
|
||||
BlockDevice(unsigned major, unsigned minor) : Device(major, minor) { }
|
||||
BlockDevice(unsigned major, unsigned minor)
|
||||
: Device(major, minor)
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
virtual bool is_block_device() const final { return true; }
|
||||
|
|
|
@ -7,7 +7,10 @@ public:
|
|||
virtual ~CharacterDevice() override;
|
||||
|
||||
protected:
|
||||
CharacterDevice(unsigned major, unsigned minor) : Device(major, minor) { }
|
||||
CharacterDevice(unsigned major, unsigned minor)
|
||||
: Device(major, minor)
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
virtual bool is_character_device() const final { return true; }
|
||||
|
|
|
@ -23,4 +23,3 @@ public:
|
|||
protected:
|
||||
DiskDevice();
|
||||
};
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#include <Kernel/Devices/DiskDevice.h>
|
||||
#include <AK/RetainPtr.h>
|
||||
#include <AK/AKString.h>
|
||||
#include <AK/RetainPtr.h>
|
||||
#include <AK/Types.h>
|
||||
#include <Kernel/Devices/DiskDevice.h>
|
||||
#include <stdio.h>
|
||||
|
||||
class FileBackedDiskDevice final : public DiskDevice {
|
||||
|
@ -30,4 +30,3 @@ private:
|
|||
DiskOffset m_file_length { 0 };
|
||||
unsigned m_block_size { 0 };
|
||||
};
|
||||
|
||||
|
|
|
@ -16,4 +16,3 @@ private:
|
|||
virtual bool can_write(FileDescriptor&) const override { return true; }
|
||||
virtual const char* class_name() const override { return "FullDevice"; }
|
||||
};
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#include <Kernel/Lock.h>
|
||||
#include <AK/RetainPtr.h>
|
||||
#include <Kernel/Devices/DiskDevice.h>
|
||||
#include <Kernel/IRQHandler.h>
|
||||
#include <Kernel/Lock.h>
|
||||
#include <Kernel/PCI.h>
|
||||
#include <Kernel/PhysicalAddress.h>
|
||||
#include <Kernel/VM/PhysicalPage.h>
|
||||
|
@ -14,7 +14,8 @@ struct PhysicalRegionDescriptor {
|
|||
word end_of_table { 0 };
|
||||
};
|
||||
|
||||
class IDEDiskDevice final : public IRQHandler, public DiskDevice {
|
||||
class IDEDiskDevice final : public IRQHandler
|
||||
, public DiskDevice {
|
||||
AK_MAKE_ETERNAL
|
||||
public:
|
||||
static Retained<IDEDiskDevice> create();
|
||||
|
@ -58,4 +59,3 @@ private:
|
|||
word m_bus_master_base { 0 };
|
||||
Lockable<bool> m_dma_enabled;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/Types.h>
|
||||
#include <AK/DoublyLinkedList.h>
|
||||
#include <AK/CircularQueue.h>
|
||||
#include <Kernel/Devices/CharacterDevice.h>
|
||||
#include "IRQHandler.h"
|
||||
#include "KeyCode.h"
|
||||
#include <AK/CircularQueue.h>
|
||||
#include <AK/DoublyLinkedList.h>
|
||||
#include <AK/Types.h>
|
||||
#include <Kernel/Devices/CharacterDevice.h>
|
||||
|
||||
class KeyboardClient;
|
||||
|
||||
class KeyboardDevice final : public IRQHandler, public CharacterDevice {
|
||||
class KeyboardDevice final : public IRQHandler
|
||||
, public CharacterDevice {
|
||||
AK_MAKE_ETERNAL
|
||||
public:
|
||||
using Event = KeyEvent;
|
||||
|
|
|
@ -18,4 +18,3 @@ private:
|
|||
virtual bool can_read(FileDescriptor&) const override;
|
||||
virtual const char* class_name() const override { return "NullDevice"; }
|
||||
};
|
||||
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
#pragma once
|
||||
|
||||
#include <Kernel/Devices/CharacterDevice.h>
|
||||
#include <Kernel/MousePacket.h>
|
||||
#include <Kernel/IRQHandler.h>
|
||||
#include <AK/CircularQueue.h>
|
||||
#include <Kernel/Devices/CharacterDevice.h>
|
||||
#include <Kernel/IRQHandler.h>
|
||||
#include <Kernel/MousePacket.h>
|
||||
|
||||
class PS2MouseDevice final : public IRQHandler, public CharacterDevice {
|
||||
class PS2MouseDevice final : public IRQHandler
|
||||
, public CharacterDevice {
|
||||
public:
|
||||
PS2MouseDevice();
|
||||
virtual ~PS2MouseDevice() override;
|
||||
|
|
|
@ -18,4 +18,3 @@ private:
|
|||
virtual bool can_write(FileDescriptor&) const override { return true; }
|
||||
virtual const char* class_name() const override { return "RandomDevice"; }
|
||||
};
|
||||
|
||||
|
|
|
@ -16,4 +16,3 @@ private:
|
|||
virtual bool can_write(FileDescriptor&) const override { return true; }
|
||||
virtual const char* class_name() const override { return "ZeroDevice"; }
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue