From ca68323930c3fb0fe099781eb417d6eae47c66e4 Mon Sep 17 00:00:00 2001 From: Vincent Coubard Date: Tue, 6 Nov 2018 14:51:06 +0000 Subject: [PATCH] Add explicit cast to bool. --- features/FEATURE_BLE/ble/pal/GapTypes.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/features/FEATURE_BLE/ble/pal/GapTypes.h b/features/FEATURE_BLE/ble/pal/GapTypes.h index a5380052e1..56e83315eb 100644 --- a/features/FEATURE_BLE/ble/pal/GapTypes.h +++ b/features/FEATURE_BLE/ble/pal/GapTypes.h @@ -818,23 +818,23 @@ struct extended_advertising_report_event_type_t { extended_advertising_report_event_type_t(uint8_t value) : value(value) { } bool connectable() { - return value & (1 << 0); + return static_cast(value & (1 << 0)); } bool scannable_advertising() { - return value & (1 << 1); + return static_cast(value & (1 << 1)); } bool directed_advertising() { - return value & (1 << 2); + return static_cast(value & (1 << 2)); } bool scan_response() { - return value & (1 << 3); + return static_cast(value & (1 << 3)); } bool legacy_advertising() { - return value & (1 << 4); + return static_cast(value & (1 << 4)); } advertising_data_status_t data_status() {