mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-25 07:21:14 +01:00
Common: Alter semantics of the NonCopyable mixin
Uses delete to make the unimplemented functions detectable at compile time and not link time if they are used. The move constructor and assignment operator are removed as moves are not copies, but transfers of ownership, which isn't suited for this class.
This commit is contained in:
parent
c08a83a5aa
commit
53465e329a
@ -60,12 +60,12 @@ extern const char *netplay_dolphin_ver;
|
||||
class NonCopyable
|
||||
{
|
||||
protected:
|
||||
NonCopyable() {}
|
||||
NonCopyable(const NonCopyable&&) {}
|
||||
void operator=(const NonCopyable&&) {}
|
||||
constexpr NonCopyable() = default;
|
||||
~NonCopyable() = default;
|
||||
|
||||
private:
|
||||
NonCopyable(NonCopyable&);
|
||||
NonCopyable& operator=(NonCopyable& other);
|
||||
NonCopyable(NonCopyable&) = delete;
|
||||
NonCopyable& operator=(NonCopyable&) = delete;
|
||||
};
|
||||
|
||||
#if defined _WIN32
|
||||
|
Loading…
x
Reference in New Issue
Block a user