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:
parent
ad575a1556
commit
ad17d9a979
|
@ -175,8 +175,11 @@ class WiiSocket
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
WiiSocket() = default;
|
WiiSocket() = default;
|
||||||
|
WiiSocket(const WiiSocket&) = delete;
|
||||||
|
WiiSocket(WiiSocket&&) = default;
|
||||||
~WiiSocket();
|
~WiiSocket();
|
||||||
void operator=(WiiSocket const&) = delete;
|
WiiSocket& operator=(const WiiSocket&) = delete;
|
||||||
|
WiiSocket& operator=(WiiSocket&&) = default;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct sockop
|
struct sockop
|
||||||
|
|
Loading…
Reference in New Issue