Skip to content

Commit 9e5e23a

Browse files
committed
BLE - Remove conditional directive in construction of Cordio objects.
1 parent a31d101 commit 9e5e23a

File tree

1 file changed

+6
-18
lines changed

1 file changed

+6
-18
lines changed

features/FEATURE_BLE/targets/TARGET_CORDIO/source/CordioBLE.cpp

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@
3636
#include "mbed_assert.h"
3737

3838
#include "CordioPalAttClient.h"
39-
#if BLE_FEATURE_SECURITY
4039
#include "CordioPalSecurityManager.h"
41-
#endif // BLE_FEATURE_SECURITY
4240

4341
/*! WSF handler ID */
4442
wsfHandlerId_t stack_handler_id;
@@ -182,13 +180,9 @@ impl::GenericGapImpl& BLE::getGap()
182180
static pal::vendor::cordio::GenericAccessService cordio_gap_service;
183181
static impl::GenericGapImpl gap(
184182
_event_queue,
185-
impl::PalGapImpl::get_gap()
186-
#if BLE_FEATURE_GATT_SERVER
187-
, cordio_gap_service
188-
#endif
189-
#if BLE_FEATURE_SECURITY
190-
, impl::PalSecurityManagerImpl::get_security_manager()
191-
#endif
183+
impl::PalGapImpl::get_gap(),
184+
cordio_gap_service,
185+
impl::PalSecurityManagerImpl::get_security_manager()
192186
);
193187

194188
return gap;
@@ -233,17 +227,11 @@ impl::PalGattClientImpl& BLE::getPalGattClient()
233227
#if BLE_FEATURE_SECURITY
234228
SecurityManager& BLE::getSecurityManager()
235229
{
236-
#if BLE_FEATURE_SIGNING
237230
static vendor::cordio::SigningEventMonitor<impl::GenericSecurityManagerImpl> signing_event_monitor;
238-
#endif
239231
static impl::GenericSecurityManagerImpl m_instance(
240-
impl::PalSecurityManagerImpl::get_security_manager()
241-
#if BLE_FEATURE_CONNECTABLE
242-
, getGap()
243-
#endif
244-
#if BLE_FEATURE_SIGNING
245-
, signing_event_monitor
246-
#endif
232+
impl::PalSecurityManagerImpl::get_security_manager(),
233+
getGap(),
234+
signing_event_monitor
247235
);
248236

249237
return m_instance;

0 commit comments

Comments
 (0)