mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
LibELF: Use default instead of an empty constructor/destructor
Default implementations allow for more optimizations. See: https://pvs-studio.com/en/docs/warnings/v832/
This commit is contained in:
committed by
Andreas Kling
parent
889ade06fe
commit
5dbc72a158
@@ -38,7 +38,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
~DynamicEntry() { }
|
||||
~DynamicEntry() = default;
|
||||
|
||||
ElfW(Sword) tag() const { return m_dyn.d_tag; }
|
||||
ElfW(Addr) ptr() const { return m_dyn.d_un.d_ptr; }
|
||||
@@ -161,7 +161,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
~Relocation() { }
|
||||
~Relocation() = default;
|
||||
|
||||
unsigned offset_in_section() const { return m_offset_in_section; }
|
||||
unsigned offset() const { return m_rel.r_offset; }
|
||||
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
~Symbol() { }
|
||||
~Symbol() = default;
|
||||
|
||||
StringView name() const { return m_image.table_string(m_sym.st_name); }
|
||||
unsigned section_index() const { return m_sym.st_shndx; }
|
||||
@@ -88,7 +88,7 @@ public:
|
||||
, m_program_header_index(program_header_index)
|
||||
{
|
||||
}
|
||||
~ProgramHeader() { }
|
||||
~ProgramHeader() = default;
|
||||
|
||||
unsigned index() const { return m_program_header_index; }
|
||||
u32 type() const { return m_program_header.p_type; }
|
||||
@@ -118,7 +118,7 @@ public:
|
||||
, m_section_index(sectionIndex)
|
||||
{
|
||||
}
|
||||
~Section() { }
|
||||
~Section() = default;
|
||||
|
||||
StringView name() const { return m_image.section_header_table_string(m_section_header.sh_name); }
|
||||
u32 type() const { return m_section_header.sh_type; }
|
||||
@@ -162,7 +162,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
~Relocation() { }
|
||||
~Relocation() = default;
|
||||
|
||||
size_t offset() const { return m_rel.r_offset; }
|
||||
#if ARCH(I386)
|
||||
|
||||
Reference in New Issue
Block a user