canonical move ctor

This commit is contained in:
artemp
2014-10-27 14:17:27 -04:00
parent dcf643fb4b
commit c3f3b9ddd5

View File

@@ -15,9 +15,8 @@ Database::Database(const std::string &filename, int flags) {
}
}
Database::Database(Database &&other) {
*this = std::move(other);
}
Database::Database(Database &&other)
: db(std::move(other.db)) {}
Database &Database::operator=(Database &&other) {
std::swap(db, other.db);