diff --git a/src/symbols/dwarf/dwarf.hpp b/src/symbols/dwarf/dwarf.hpp index f643285..aa2c689 100644 --- a/src/symbols/dwarf/dwarf.hpp +++ b/src/symbols/dwarf/dwarf.hpp @@ -555,9 +555,7 @@ namespace libdwarf { } srcfiles(const srcfiles&) = delete; srcfiles(srcfiles&& other) { - std::swap(dbg, other.dbg); - std::swap(dw_srcfiles, other.dw_srcfiles); - std::swap(dw_filecount, other.dw_filecount); + *this = std::move(other); } srcfiles& operator=(const srcfiles&) = delete; srcfiles& operator=(srcfiles&& other) { diff --git a/src/symbols/dwarf/dwarf_resolver.cpp b/src/symbols/dwarf/dwarf_resolver.cpp index 0cfbf3b..8012422 100644 --- a/src/symbols/dwarf/dwarf_resolver.cpp +++ b/src/symbols/dwarf/dwarf_resolver.cpp @@ -78,9 +78,7 @@ namespace libdwarf { } line_table_info(const line_table_info&) = delete; line_table_info(line_table_info&& other) { - std::swap(version, other.version); - std::swap(line_context, other.line_context); - std::swap(line_entries, other.line_entries); + *this = std::move(other); } line_table_info& operator=(const line_table_info&) = delete; line_table_info& operator=(line_table_info&& other) {