am 1e75a9b5: Merge "Bionic: Make DISALLOW_COPY_AND_ASSIGN conditional"
* commit '1e75a9b56ad746ff038ca956bd3d83fe4b9a156f': Bionic: Make DISALLOW_COPY_AND_ASSIGN conditional
This commit is contained in:
commit
5f93f65d3f
@ -17,11 +17,16 @@
|
|||||||
#ifndef _BIONIC_MACROS_H_
|
#ifndef _BIONIC_MACROS_H_
|
||||||
#define _BIONIC_MACROS_H_
|
#define _BIONIC_MACROS_H_
|
||||||
|
|
||||||
|
// Frameworks OpenGL code currently leaks this header and allows
|
||||||
|
// collisions with other declarations, e.g., from libnativehelper.
|
||||||
|
// TODO: Remove once cleaned up. b/18334516
|
||||||
|
#if !defined(DISALLOW_COPY_AND_ASSIGN)
|
||||||
// DISALLOW_COPY_AND_ASSIGN disallows the copy and operator= functions.
|
// DISALLOW_COPY_AND_ASSIGN disallows the copy and operator= functions.
|
||||||
// It goes in the private: declarations in a class.
|
// It goes in the private: declarations in a class.
|
||||||
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
|
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
|
||||||
TypeName(const TypeName&) = delete; \
|
TypeName(const TypeName&) = delete; \
|
||||||
void operator=(const TypeName&) = delete
|
void operator=(const TypeName&) = delete
|
||||||
|
#endif // !defined(DISALLOW_COPY_AND_ASSIGN)
|
||||||
|
|
||||||
// A macro to disallow all the implicit constructors, namely the
|
// A macro to disallow all the implicit constructors, namely the
|
||||||
// default constructor, copy constructor and operator= functions.
|
// default constructor, copy constructor and operator= functions.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user