1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:07:36 +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:
Ben Wiederhake 2021-02-28 14:42:08 +01:00 committed by Andreas Kling
parent 2dea887e8f
commit 860a3bbce3
28 changed files with 33 additions and 38 deletions

View file

@ -68,7 +68,7 @@ public:
private:
PhysicalPage(PhysicalAddress paddr, bool supervisor, bool may_return_to_freelist = true);
~PhysicalPage() { }
~PhysicalPage() = default;
void return_to_freelist() const;

View file

@ -39,7 +39,7 @@ class PhysicalRegion : public RefCounted<PhysicalRegion> {
public:
static NonnullRefPtr<PhysicalRegion> create(PhysicalAddress lower, PhysicalAddress upper);
~PhysicalRegion() { }
~PhysicalRegion() = default;
void expand(PhysicalAddress lower, PhysicalAddress upper);
unsigned finalize_capacity();

View file

@ -41,7 +41,7 @@ class PhysicalPage;
class VMObjectDeletedHandler {
public:
virtual ~VMObjectDeletedHandler() { }
virtual ~VMObjectDeletedHandler() = default;
virtual void vmobject_deleted(VMObject&) = 0;
};