fix tcpsocket move
All checks were successful
Linux arm64 / Build (push) Successful in 15s

This commit is contained in:
2025-03-02 21:04:14 +01:00
parent afc4189450
commit b687ac65f1

View File

@@ -44,7 +44,10 @@ TcpSocket::IOInterface(const std::string& a_Host, std::uint16_t a_Port) : IOInte
Connect(a_Host, a_Port); Connect(a_Host, a_Port);
} }
TcpSocket::IOInterface(IOInterface&& a_Other) {} TcpSocket::IOInterface(IOInterface&& a_Other) {
std::swap(m_Handle, a_Other.m_Handle);
std::swap(m_Status, a_Other.m_Status);
}
TcpSocket::~IOInterface() {} TcpSocket::~IOInterface() {}
@@ -154,6 +157,7 @@ void TcpSocket::Disconnect() {
TcpSocket& TcpSocket::operator=(IOInterface&& a_Other) { TcpSocket& TcpSocket::operator=(IOInterface&& a_Other) {
std::swap(m_Handle, a_Other.m_Handle); std::swap(m_Handle, a_Other.m_Handle);
std::swap(m_Status, a_Other.m_Status); std::swap(m_Status, a_Other.m_Status);
return *this;
} }
} // namespace io } // namespace io