Simplify to two move constructors, just use the move assignment operator

This commit is contained in:
Jeremy Rifkin 2025-02-17 13:51:26 -06:00
parent ead3f128aa
commit 111f8e6aec
No known key found for this signature in database
GPG Key ID: 19AA8270105E8EB4
2 changed files with 2 additions and 6 deletions

View File

@ -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) {

View File

@ -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) {