diff options
| author | 2015-05-06 01:56:18 -0300 | |
|---|---|---|
| committer | 2015-05-06 23:45:04 -0300 | |
| commit | 7a4b717772daf91819170caf32a71baa845c46ea (patch) | |
| tree | e6c67a14185ed63f3cf1af22ba79038f5141de30 | |
| parent | Common: Remove unused enums (diff) | |
| download | yuzu-7a4b717772daf91819170caf32a71baa845c46ea.tar.gz yuzu-7a4b717772daf91819170caf32a71baa845c46ea.tar.xz yuzu-7a4b717772daf91819170caf32a71baa845c46ea.zip | |
Common: Use C++11 deleted functions for NonCopyable
Diffstat (limited to '')
| -rw-r--r-- | src/common/common.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/common/common.h b/src/common/common.h index d11e57b1e..d64635620 100644 --- a/src/common/common.h +++ b/src/common/common.h | |||
| @@ -14,15 +14,13 @@ | |||
| 14 | #define STACKALIGN | 14 | #define STACKALIGN |
| 15 | 15 | ||
| 16 | // An inheritable class to disallow the copy constructor and operator= functions | 16 | // An inheritable class to disallow the copy constructor and operator= functions |
| 17 | class NonCopyable | 17 | class NonCopyable { |
| 18 | { | ||
| 19 | protected: | 18 | protected: |
| 20 | NonCopyable() {} | 19 | NonCopyable() = default; |
| 21 | NonCopyable(const NonCopyable&&) {} | 20 | ~NonCopyable() = default; |
| 22 | void operator=(const NonCopyable&&) {} | 21 | |
| 23 | private: | 22 | NonCopyable(NonCopyable&) = delete; |
| 24 | NonCopyable(NonCopyable&); | 23 | NonCopyable& operator=(NonCopyable&) = delete; |
| 25 | NonCopyable& operator=(NonCopyable& other); | ||
| 26 | }; | 24 | }; |
| 27 | 25 | ||
| 28 | #include "common/assert.h" | 26 | #include "common/assert.h" |