summaryrefslogtreecommitdiffstats
path: root/src/common/common_types.h
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2015-05-06 09:05:02 +0200
committerYuri Kunde Schlesner <yuriks@yuriks.net>2015-05-07 04:45:05 +0200
commit6ad71c216b2d1112c96d621140c60b4e1b359811 (patch)
treedd0a12d5f3939ec4102ca92884659737814821ef /src/common/common_types.h
parentCommon: Use C++11 deleted functions for NonCopyable (diff)
downloadyuzu-6ad71c216b2d1112c96d621140c60b4e1b359811.tar
yuzu-6ad71c216b2d1112c96d621140c60b4e1b359811.tar.gz
yuzu-6ad71c216b2d1112c96d621140c60b4e1b359811.tar.bz2
yuzu-6ad71c216b2d1112c96d621140c60b4e1b359811.tar.lz
yuzu-6ad71c216b2d1112c96d621140c60b4e1b359811.tar.xz
yuzu-6ad71c216b2d1112c96d621140c60b4e1b359811.tar.zst
yuzu-6ad71c216b2d1112c96d621140c60b4e1b359811.zip
Diffstat (limited to '')
-rw-r--r--src/common/common_types.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/common/common_types.h b/src/common/common_types.h
index 1b453e7f5..5c004c5fa 100644
--- a/src/common/common_types.h
+++ b/src/common/common_types.h
@@ -73,6 +73,16 @@ union t64 {
u8 _u8[8]; ///< 8-bit unsigned char(s)
};
+// An inheritable class to disallow the copy constructor and operator= functions
+class NonCopyable {
+protected:
+ NonCopyable() = default;
+ ~NonCopyable() = default;
+
+ NonCopyable(NonCopyable&) = delete;
+ NonCopyable& operator=(NonCopyable&) = delete;
+};
+
namespace Common {
/// Rectangle data structure
class Rect {