From ad17d9a9799f581f734963699e4ab135726cb308 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 1 Apr 2018 15:32:33 -0400 Subject: [PATCH] IOS/Socket: Delete WiiSocket's copy constructor If the copy assignment operator is deleted, then the copy constructor should be deleted as well, otherwise it's a hole in the API where copies can be made (and if this were an intended case, it should be documented). So we delete the copy constructor and explicitly default the move assignment and move constructor to signify this is intended to be a move-only type. --- Source/Core/Core/IOS/Network/Socket.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Core/Core/IOS/Network/Socket.h b/Source/Core/Core/IOS/Network/Socket.h index 028f70022d..7299de5429 100644 --- a/Source/Core/Core/IOS/Network/Socket.h +++ b/Source/Core/Core/IOS/Network/Socket.h @@ -175,8 +175,11 @@ class WiiSocket { public: WiiSocket() = default; + WiiSocket(const WiiSocket&) = delete; + WiiSocket(WiiSocket&&) = default; ~WiiSocket(); - void operator=(WiiSocket const&) = delete; + WiiSocket& operator=(const WiiSocket&) = delete; + WiiSocket& operator=(WiiSocket&&) = default; private: struct sockop