fix move operator= function
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user