summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2019-01-14 16:29:43 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2019-01-14 16:29:43 +0000
commitdea312bf1422d8df81e476f4a851dc640125ba86 (patch)
treef4cab8a81c946c2ed0643d834ed5ba3994cf1d42
parent9e03e1d2dc3995da90f749a6fbcb73e66f7d4ced (diff)
parente7de61676c6373df6d6444bb532e43fd967fdf2f (diff)
downloadsystem_core-dea312bf1422d8df81e476f4a851dc640125ba86.tar.gz
system_core-dea312bf1422d8df81e476f4a851dc640125ba86.tar.bz2
system_core-dea312bf1422d8df81e476f4a851dc640125ba86.zip
Merge "Move the template out of extern "C"."
-rw-r--r--libnativebridge/native_bridge.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/libnativebridge/native_bridge.cc b/libnativebridge/native_bridge.cc
index 9997b2a1b..a2d8d81ef 100644
--- a/libnativebridge/native_bridge.cc
+++ b/libnativebridge/native_bridge.cc
@@ -33,6 +33,11 @@
namespace android {
+#ifdef __APPLE__
+template <typename T>
+void UNUSED(const T&) {}
+#endif
+
extern "C" {
// Environment values required by the apps running with native bridge.
@@ -254,10 +259,6 @@ bool NeedsNativeBridge(const char* instruction_set) {
return strncmp(instruction_set, ABI_STRING, strlen(ABI_STRING) + 1) != 0;
}
-#ifdef __APPLE__
-template<typename T> void UNUSED(const T&) {}
-#endif
-
bool PreInitializeNativeBridge(const char* app_data_dir_in, const char* instruction_set) {
if (state != NativeBridgeState::kOpened) {
ALOGE("Invalid state: native bridge is expected to be opened.");