More refactoring

This commit is contained in:
Serge Lamikhov-Center 2022-09-16 20:51:20 +03:00
parent b57b08409b
commit f21f8ad533
2 changed files with 6 additions and 5 deletions

View File

@ -931,8 +931,7 @@ class dump
note_segment_accessor notes( reader, seg );
Elf_Word no_notes = notes.get_notes_num();
if ( no > 0 ) {
out << "Note segment (" << i << ")"
<< std::endl
out << "Note segment (" << i << ")" << std::endl
<< " No Name Data size Description"
<< std::endl;
for ( Elf_Word j = 0; j < no_notes; ++j ) { // For all notes

View File

@ -33,7 +33,8 @@ template <class S> class modinfo_section_accessor_template
{
public:
//------------------------------------------------------------------------------
explicit modinfo_section_accessor_template( S* section ) : modinfo_section( section )
explicit modinfo_section_accessor_template( S* section )
: modinfo_section( section )
{
process_section();
}
@ -43,7 +44,7 @@ template <class S> class modinfo_section_accessor_template
//------------------------------------------------------------------------------
bool
get_attribute( Elf_Word no, const std::string& field, const std::string& value ) const
get_attribute( Elf_Word no, std::string& field, std::string& value ) const
{
if ( no < content.size() ) {
field = content[no].first;
@ -55,7 +56,8 @@ template <class S> class modinfo_section_accessor_template
}
//------------------------------------------------------------------------------
bool get_attribute( const std::string& field_name, std::string& value ) const
bool get_attribute( const std::string& field_name,
std::string& value ) const
{
for ( auto& i : content ) {
if ( field_name == i.first ) {