diff --git a/webrtc/base/constructormagic.h b/webrtc/base/constructormagic.h index c20be2b32f..ceee37de4b 100644 --- a/webrtc/base/constructormagic.h +++ b/webrtc/base/constructormagic.h @@ -11,19 +11,22 @@ #ifndef WEBRTC_BASE_CONSTRUCTORMAGIC_H_ #define WEBRTC_BASE_CONSTRUCTORMAGIC_H_ +// Undefine macros first, just in case. Some third-party includes have their own +// version. + +#undef DISALLOW_ASSIGN #define DISALLOW_ASSIGN(TypeName) \ void operator=(const TypeName&) // A macro to disallow the evil copy constructor and operator= functions // This should be used in the private: declarations for a class. -// Undefine this, just in case. Some third-party includes have their own -// version. #undef DISALLOW_COPY_AND_ASSIGN #define DISALLOW_COPY_AND_ASSIGN(TypeName) \ TypeName(const TypeName&); \ DISALLOW_ASSIGN(TypeName) // Alternative, less-accurate legacy name. +#undef DISALLOW_EVIL_CONSTRUCTORS #define DISALLOW_EVIL_CONSTRUCTORS(TypeName) \ DISALLOW_COPY_AND_ASSIGN(TypeName) @@ -33,6 +36,7 @@ // This should be used in the private: declarations for a class // that wants to prevent anyone from instantiating it. This is // especially useful for classes containing only static methods. +#undef DISALLOW_IMPLICIT_CONSTRUCTORS #define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \ TypeName(); \ DISALLOW_EVIL_CONSTRUCTORS(TypeName)