From e7de61676c6373df6d6444bb532e43fd967fdf2f Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Mon, 14 Jan 2019 14:12:03 +0000 Subject: [PATCH] Move the template out of extern "C". Fixes mac build Test: rely on post-submit Change-Id: I3a6e7fe7d81cd0dfa46e4ded5a543c4cb8c6ca64 --- libnativebridge/native_bridge.cc | 9 +++++---- 1 file 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 +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 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.");