constructormagic.h macros are duplicated in several repositories. undef them in webrtc to prevent conflict for some build configurations.
BUG=N/A R=minyue@webrtc.org Review URL: https://webrtc-codereview.appspot.com/18619004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@6554 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
f4d6d7c27e
commit
680555f923
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user