summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Henri Chataing <henrichataing@google.com> 2024-04-05 17:27:11 -0700
committer Henri Chataing <henrichataing@google.com> 2024-04-05 17:39:28 -0700
commitcafa0e52ca0eac365fa2b5c033d01ed30e73c29f (patch)
treea01a38424c9cd060a3102763040a0784a0e95e55
parentf74910d43791b629218df9fab93503774f0d00de (diff)
Inline DISALLOW_COPY_AND_ASSIGN
Used in one location only, defined twice Bug: 331817295 Test: m com.android.btservices Flag: EXEMPT, macro inlining Change-Id: I4c992ed51ed2df258a69bf7e8aeac6e2317c970b
-rw-r--r--android/app/jni/com_android_bluetooth.h3
-rw-r--r--system/common/utils.h7
-rw-r--r--system/gd/os/utils.h7
3 files changed, 2 insertions, 15 deletions
diff --git a/android/app/jni/com_android_bluetooth.h b/android/app/jni/com_android_bluetooth.h
index 45b4e74d13..3723a23928 100644
--- a/android/app/jni/com_android_bluetooth.h
+++ b/android/app/jni/com_android_bluetooth.h
@@ -124,7 +124,8 @@ private:
JNIEnv *mCallbackEnv;
const char *mName;
- DISALLOW_COPY_AND_ASSIGN(CallbackEnv);
+ CallbackEnv(const CallbackEnv&) = delete;
+ void operator=(const CallbackEnv&) = delete;
};
const bt_interface_t* getBluetoothInterface();
diff --git a/system/common/utils.h b/system/common/utils.h
index 26e8f23df9..c6cf0635ed 100644
--- a/system/common/utils.h
+++ b/system/common/utils.h
@@ -22,10 +22,3 @@
do { \
} while ((fn) == -1 && errno == EINTR)
#endif
-
-// A macro to disallow the copy constructor and operator= functions
-#ifndef DISALLOW_COPY_AND_ASSIGN
-#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
- TypeName(const TypeName&) = delete; \
- void operator=(const TypeName&) = delete
-#endif
diff --git a/system/gd/os/utils.h b/system/gd/os/utils.h
index a328afb48d..f768a317d7 100644
--- a/system/gd/os/utils.h
+++ b/system/gd/os/utils.h
@@ -23,10 +23,3 @@
do { \
} while ((fn) == -1 && errno == EINTR)
#endif
-
-// A macro to disallow the copy constructor and operator= functions
-#ifndef DISALLOW_COPY_AND_ASSIGN
-#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
- TypeName(const TypeName&) = delete; \
- void operator=(const TypeName&) = delete
-#endif