diff options
author | Ben Wiederhake <BenWiederhake.GitHub@gmx.de> | 2021-02-28 14:42:08 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-02-28 18:09:12 +0100 |
commit | 860a3bbce342067069d4c7d2e4396a667ff324fe (patch) | |
tree | 8110f5d9a7293a4371205ffffd7c8717b8a29471 /Kernel/FileSystem | |
parent | 2dea887e8fe43438cd5005820515fc21a1e4521c (diff) | |
download | serenity-860a3bbce342067069d4c7d2e4396a667ff324fe.zip |
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.
Diffstat (limited to 'Kernel/FileSystem')
-rw-r--r-- | Kernel/FileSystem/BlockBasedFileSystem.cpp | 2 | ||||
-rw-r--r-- | Kernel/FileSystem/FileDescription.h | 2 | ||||
-rw-r--r-- | Kernel/FileSystem/InodeIdentifier.h | 2 | ||||
-rw-r--r-- | Kernel/FileSystem/ProcFS.h | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/Kernel/FileSystem/BlockBasedFileSystem.cpp b/Kernel/FileSystem/BlockBasedFileSystem.cpp index 334cd40abd..2fd6db61cc 100644 --- a/Kernel/FileSystem/BlockBasedFileSystem.cpp +++ b/Kernel/FileSystem/BlockBasedFileSystem.cpp @@ -51,7 +51,7 @@ public: } } - ~DiskCache() { } + ~DiskCache() = default; bool is_dirty() const { return m_dirty; } void set_dirty(bool b) { m_dirty = b; } diff --git a/Kernel/FileSystem/FileDescription.h b/Kernel/FileSystem/FileDescription.h index 6dc0e9a4b6..2b340b11d3 100644 --- a/Kernel/FileSystem/FileDescription.h +++ b/Kernel/FileSystem/FileDescription.h @@ -40,7 +40,7 @@ namespace Kernel { class FileDescriptionData { public: - virtual ~FileDescriptionData() { } + virtual ~FileDescriptionData() = default; }; class FileDescription : public RefCounted<FileDescription> { diff --git a/Kernel/FileSystem/InodeIdentifier.h b/Kernel/FileSystem/InodeIdentifier.h index b28216e64b..b869be5469 100644 --- a/Kernel/FileSystem/InodeIdentifier.h +++ b/Kernel/FileSystem/InodeIdentifier.h @@ -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) diff --git a/Kernel/FileSystem/ProcFS.h b/Kernel/FileSystem/ProcFS.h index cff537b692..1909f6e378 100644 --- a/Kernel/FileSystem/ProcFS.h +++ b/Kernel/FileSystem/ProcFS.h @@ -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) |