Merge branch '2.3' into 2.4
This commit is contained in:
@ -276,17 +276,30 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
Connection(Connection&& rhs)
|
Connection(Connection&& rhs)
|
||||||
: m_host(rhs.m_host)
|
: m_host(std::move(rhs.m_host))
|
||||||
, m_port(rhs.m_port)
|
, m_port(std::move(rhs.m_port))
|
||||||
, m_user(rhs.m_user)
|
, m_user(std::move(rhs.m_user))
|
||||||
, m_pw(rhs.m_pw)
|
, m_pw(std::move(rhs.m_pw))
|
||||||
, m_db(rhs.m_db)
|
, m_db(std::move(rhs.m_db))
|
||||||
, m_ssl(rhs.m_ssl)
|
, m_ssl(std::move(rhs.m_ssl))
|
||||||
, m_conn(rhs.m_conn)
|
, m_conn(std::move(rhs.m_conn))
|
||||||
{
|
{
|
||||||
rhs.m_conn = nullptr;
|
rhs.m_conn = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Connection& operator=(Connection&& rhs)
|
||||||
|
{
|
||||||
|
m_host = std::move(rhs.m_host);
|
||||||
|
m_port = std::move(rhs.m_port);
|
||||||
|
m_user = std::move(rhs.m_user);
|
||||||
|
m_pw = std::move(rhs.m_pw);
|
||||||
|
m_db = std::move(rhs.m_db);
|
||||||
|
m_ssl = std::move(rhs.m_ssl);
|
||||||
|
m_conn = std::move(rhs.m_conn);
|
||||||
|
rhs.m_conn = nullptr;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
virtual ~Connection()
|
virtual ~Connection()
|
||||||
{
|
{
|
||||||
mysql_close(m_conn);
|
mysql_close(m_conn);
|
||||||
|
|||||||
Reference in New Issue
Block a user