Bug 1091575: Cleanup Bluetooth's CONVERT macro (under bluetooth2/), r=btian

The patch moves the array handling out of Bluetooth's CONVERT
macro. The change allows the use of the functionality in non-
conversion code.
This commit is contained in:
Thomas Zimmermann 2014-11-14 10:04:33 +01:00
parent a47ef0529a
commit 4008f785ed

View File

@ -18,14 +18,17 @@ extern bool gBluetoothDebugFlag;
#if MOZ_IS_GCC && MOZ_GCC_VERSION_AT_LEAST(4, 7, 0)
/* use designated array initializers if supported */
#define CONVERT(in_, out_) \
#define INIT_ARRAY_AT(in_, out_) \
[in_] = out_
#else
/* otherwise init array element by position */
#define CONVERT(in_, out_) \
#define INIT_ARRAY_AT(in_, out_) \
out_
#endif
#define CONVERT(in_, out_) \
INIT_ARRAY_AT(in_, out_)
#undef BT_LOG
#if defined(MOZ_WIDGET_GONK)
#include <android/log.h>