Explorar o código

added DISALLOW_COPY_AND_ASSIGN macro

bunnei %!s(int64=12) %!d(string=hai) anos
pai
achega
925a894c1b
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      src/common/src/common.h

+ 5 - 0
src/common/src/common.h

@@ -163,4 +163,9 @@ enum EMUSTATE_CHANGE
     EMUSTATE_CHANGE_STOP
 };
 
+// This should be used in the private: declarations for a class
+#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
+    TypeName(const TypeName&);               \
+    void operator=(const TypeName&)
+
 #endif // _COMMON_H_