mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:57:44 +00:00
Kernel: Use default con/de-structors
This may seem like a no-op change, however it shrinks down the Kernel by a bit: .text -432 .unmap_after_init -60 .data -480 .debug_info -673 .debug_aranges 8 .debug_ranges -232 .debug_line -558 .debug_str -308 .debug_frame -40 With '= default', the compiler can do more inlining, hence the savings. I intentionally omitted some opportunities for '= default', because they would increase the Kernel size.
This commit is contained in:
parent
2dea887e8f
commit
860a3bbce3
28 changed files with 33 additions and 38 deletions
|
@ -51,7 +51,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
~DiskCache() { }
|
||||
~DiskCache() = default;
|
||||
|
||||
bool is_dirty() const { return m_dirty; }
|
||||
void set_dirty(bool b) { m_dirty = b; }
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace Kernel {
|
|||
|
||||
class FileDescriptionData {
|
||||
public:
|
||||
virtual ~FileDescriptionData() { }
|
||||
virtual ~FileDescriptionData() = default;
|
||||
};
|
||||
|
||||
class FileDescription : public RefCounted<FileDescription> {
|
||||
|
|
|
@ -40,7 +40,7 @@ TYPEDEF_DISTINCT_ORDERED_ID(unsigned, InodeIndex);
|
|||
|
||||
class InodeIdentifier {
|
||||
public:
|
||||
InodeIdentifier() { }
|
||||
InodeIdentifier() = default;
|
||||
InodeIdentifier(u32 fsid, InodeIndex inode)
|
||||
: m_fsid(fsid)
|
||||
, m_index(inode)
|
||||
|
|
|
@ -58,7 +58,7 @@ private:
|
|||
ProcFS();
|
||||
|
||||
struct ProcFSDirectoryEntry {
|
||||
ProcFSDirectoryEntry() { }
|
||||
ProcFSDirectoryEntry() = default;
|
||||
ProcFSDirectoryEntry(const char* a_name, unsigned a_proc_file_type, bool a_supervisor_only, bool (*read_callback)(InodeIdentifier, KBufferBuilder&) = nullptr, ssize_t (*write_callback)(InodeIdentifier, const UserOrKernelBuffer&, size_t) = nullptr, RefPtr<ProcFSInode>&& a_inode = nullptr)
|
||||
: name(a_name)
|
||||
, proc_file_type(a_proc_file_type)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue