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.
This commit is contained in:
Lioncash 2018-04-01 15:32:33 -04:00
parent ad575a1556
commit ad17d9a979
1 changed files with 4 additions and 1 deletions

View File

@ -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