WiiSocket: Explicitly delete move operators

The move assignment operator for a class is implicitly deleted when the
class has a non-static reference data member, which is true of
WiiSocket's m_socket_manager member.

Explicitly declaring the operator as default generates a
-Wdefaulted-function-deleted warning on Clang.

Delete the move constructor as well for consistency.
This commit is contained in:
Dentomologist 2023-11-10 11:37:17 -08:00
parent 8140d6b1d3
commit 9ebd257206

View File

@ -182,10 +182,10 @@ class WiiSocket
public:
explicit WiiSocket(WiiSockMan& socket_manager) : m_socket_manager(socket_manager) {}
WiiSocket(const WiiSocket&) = delete;
WiiSocket(WiiSocket&&) = default;
WiiSocket(WiiSocket&&) = delete;
~WiiSocket();
WiiSocket& operator=(const WiiSocket&) = delete;
WiiSocket& operator=(WiiSocket&&) = default;
WiiSocket& operator=(WiiSocket&&) = delete;
private:
using Timeout = std::chrono::time_point<std::chrono::steady_clock>;