From 0526de453601f1049dc2475ca5129dcec38f2d8f Mon Sep 17 00:00:00 2001 From: Nikolaos Strikos Date: Sat, 11 Apr 2020 13:30:19 +0200 Subject: [PATCH 1/2] ble_mesh: Do not #define bool when compiling in C++ --- components/bt/esp_ble_mesh/mesh_common/include/mesh_types.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/bt/esp_ble_mesh/mesh_common/include/mesh_types.h b/components/bt/esp_ble_mesh/mesh_common/include/mesh_types.h index 5a189630cd..8af8b60754 100644 --- a/components/bt/esp_ble_mesh/mesh_common/include/mesh_types.h +++ b/components/bt/esp_ble_mesh/mesh_common/include/mesh_types.h @@ -28,6 +28,7 @@ typedef unsigned long long u64_t; typedef int bt_mesh_atomic_t; +#ifndef __cplusplus #ifndef bool #define bool int8_t #endif @@ -39,6 +40,7 @@ typedef int bt_mesh_atomic_t; #ifndef true #define true 1 #endif +#endif #ifndef PRIu64 #define PRIu64 "llu" From 1dbbc55cc0808d311fc5739a3d76bbf30a661d8b Mon Sep 17 00:00:00 2001 From: lly Date: Thu, 11 Jun 2020 16:17:49 +0800 Subject: [PATCH 2/2] ble_mesh: Remove boolean type definitions --- .../esp_ble_mesh/mesh_common/include/mesh_types.h | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/components/bt/esp_ble_mesh/mesh_common/include/mesh_types.h b/components/bt/esp_ble_mesh/mesh_common/include/mesh_types.h index 8af8b60754..61cddba0d0 100644 --- a/components/bt/esp_ble_mesh/mesh_common/include/mesh_types.h +++ b/components/bt/esp_ble_mesh/mesh_common/include/mesh_types.h @@ -28,20 +28,6 @@ typedef unsigned long long u64_t; typedef int bt_mesh_atomic_t; -#ifndef __cplusplus -#ifndef bool -#define bool int8_t -#endif - -#ifndef false -#define false 0 -#endif - -#ifndef true -#define true 1 -#endif -#endif - #ifndef PRIu64 #define PRIu64 "llu" #endif