fix move operator= function

This commit is contained in:
Jie 2025-03-26 17:50:15 +08:00
parent ea90ef1398
commit d293180eb1

View File

@ -84,8 +84,7 @@ public:
SqlConnection& operator=(SqlConnection&& other){
if(this != &other){
auto temp = SqlConnection{};
temp.Connect(other.ip, other.port, other.username, other.password, other.database_name);
this->Connect(other.ip, other.port, other.username, other.password, other.database_name);
other.Close();
}
return *this;