From 3eaa8525dadc0e17356ac201f1619a86722edc27 Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Tue, 4 Nov 2014 13:20:30 -0800 Subject: [PATCH] Don't define DISALLOW_COPY_AND_ASSIGN if already defined. Required by: https://android-review.googlesource.com/#/c/113053/ Change-Id: I0226afffc738a4b7c162a0d467513a35d62dbfdc --- runtime/base/macros.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/runtime/base/macros.h b/runtime/base/macros.h index 90cf951ca..d29743902 100644 --- a/runtime/base/macros.h +++ b/runtime/base/macros.h @@ -70,9 +70,11 @@ friend class test_set_name##_##individual_test##_Test // DISALLOW_COPY_AND_ASSIGN disallows the copy and operator= functions. It goes in the private: // declarations in a class. +#if !defined(DISALLOW_COPY_AND_ASSIGN) #define DISALLOW_COPY_AND_ASSIGN(TypeName) \ TypeName(const TypeName&) = delete; \ void operator=(const TypeName&) = delete +#endif // A macro to disallow all the implicit constructors, namely the default constructor, copy // constructor and operator= functions. -- 2.11.0