modernize-use-equals-default

This commit is contained in:
Serge Lamikhov-Center 2021-08-26 13:01:12 +03:00
parent da4f857e07
commit 1343e5f979
3 changed files with 14 additions and 6 deletions

View File

@ -30,7 +30,8 @@ namespace ELFIO {
class elf_header
{
public:
virtual ~elf_header(){};
virtual ~elf_header() = default;
virtual bool load( std::istream& stream ) = 0;
virtual bool save( std::ostream& stream ) const = 0;

View File

@ -34,7 +34,7 @@ class section
friend class elfio;
public:
virtual ~section(){};
virtual ~section() = default;
ELFIO_GET_ACCESS_DECL( Elf_Half, index );
ELFIO_GET_SET_ACCESS_DECL( std::string, name );

View File

@ -34,7 +34,7 @@ class segment
friend class elfio;
public:
virtual ~segment(){};
virtual ~segment() = default;
ELFIO_GET_ACCESS_DECL( Elf_Half, index );
ELFIO_GET_SET_ACCESS_DECL( Elf_Word, type );
@ -106,7 +106,8 @@ template <class T> class segment_impl : public segment
const char* get_data() const override { return data; }
//------------------------------------------------------------------------------
Elf_Half add_section_index( Elf_Half sec_index, Elf_Xword addr_align ) override
Elf_Half add_section_index( Elf_Half sec_index,
Elf_Xword addr_align ) override
{
sections.emplace_back( sec_index );
if ( addr_align > get_align() ) {
@ -123,7 +124,10 @@ template <class T> class segment_impl : public segment
}
//------------------------------------------------------------------------------
Elf_Half get_sections_num() const override { return (Elf_Half)sections.size(); }
Elf_Half get_sections_num() const override
{
return (Elf_Half)sections.size();
}
//------------------------------------------------------------------------------
Elf_Half get_section_index_at( Elf_Half num ) const override
@ -151,7 +155,10 @@ template <class T> class segment_impl : public segment
bool is_offset_initialized() const override { return is_offset_set; }
//------------------------------------------------------------------------------
const std::vector<Elf_Half>& get_sections() const override { return sections; }
const std::vector<Elf_Half>& get_sections() const override
{
return sections;
}
//------------------------------------------------------------------------------
void set_index( Elf_Half value ) override { index = value; }