From c04cfc2545b3f2dc3f5ea095587d18954211fb3a 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 5a189630c..8af8b6075 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 a0f1a43edcf8841ed0eb4b9f37aca4edc10f0463 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 8af8b6075..61cddba0d 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