mirror of
https://github.com/serge1/ELFIO.git
synced 2025-01-30 06:32:43 +00:00
Remove unused var; Use std::swap()
This commit is contained in:
parent
ac54727fe4
commit
49c676ad06
@ -383,7 +383,6 @@ template <class S> class symbol_section_accessor_template
|
||||
std::function<void( Elf_Xword first, Elf_Xword second )> func )
|
||||
{
|
||||
const endianess_convertor& convertor = elf_file.get_convertor();
|
||||
const Elf_Xword size = symbol_section->get_entry_size();
|
||||
|
||||
Elf_Xword first_not_local =
|
||||
1; // Skip the first entry. It is always NOTYPE
|
||||
@ -414,11 +413,7 @@ template <class S> class symbol_section_accessor_template
|
||||
if ( func )
|
||||
func( first_not_local, current );
|
||||
|
||||
// Swap the symbols
|
||||
T tmp;
|
||||
std::copy( p1, p1 + 1, &tmp );
|
||||
std::copy( p2, p2 + 1, p1 );
|
||||
std::copy( &tmp, &tmp + 1, p2 );
|
||||
std::swap( *p1, *p2 );
|
||||
}
|
||||
else {
|
||||
// Update 'info' field of the section
|
||||
|
Loading…
x
Reference in New Issue
Block a user