diff options
| author | JF <JF002@users.noreply.github.com> | 2021-10-09 17:53:41 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-09 17:53:41 (GMT) |
| commit | f99f71cc6ef34ba76ed63decd0ba47f26c544dcc (patch) | |
| tree | ecc7452f90b1b67ca270eba353acf0d70a4465af /src/components/ble/AlertNotificationService.cpp | |
| parent | 4118f97812c6335b907a2b5602dcb12ed40aa0da (diff) | |
| parent | 487ae478adf4f4c8be0ff61f8433e7018426b661 (diff) | |
Merge pull request #524 from jonvmey/ble-uuid-c-casts
Remove unnecessary C-style casts with BLE UUIDs
Diffstat (limited to 'src/components/ble/AlertNotificationService.cpp')
| -rw-r--r-- | src/components/ble/AlertNotificationService.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/components/ble/AlertNotificationService.cpp b/src/components/ble/AlertNotificationService.cpp index d5fc7f6..56fc595 100644 --- a/src/components/ble/AlertNotificationService.cpp +++ b/src/components/ble/AlertNotificationService.cpp @@ -26,11 +26,8 @@ void AlertNotificationService::Init() { } AlertNotificationService::AlertNotificationService(System::SystemTask& systemTask, NotificationManager& notificationManager) - : characteristicDefinition {{.uuid = (ble_uuid_t*) &ansCharUuid, - .access_cb = AlertNotificationCallback, - .arg = this, - .flags = BLE_GATT_CHR_F_WRITE}, - {.uuid = (ble_uuid_t*) ¬ificationEventUuid, + : characteristicDefinition {{.uuid = &ansCharUuid.u, .access_cb = AlertNotificationCallback, .arg = this, .flags = BLE_GATT_CHR_F_WRITE}, + {.uuid = ¬ificationEventUuid.u, .access_cb = AlertNotificationCallback, .arg = this, .flags = BLE_GATT_CHR_F_NOTIFY, @@ -39,7 +36,7 @@ AlertNotificationService::AlertNotificationService(System::SystemTask& systemTas serviceDefinition { {/* Device Information Service */ .type = BLE_GATT_SVC_TYPE_PRIMARY, - .uuid = (ble_uuid_t*) &ansUuid, + .uuid = &ansUuid.u, .characteristics = characteristicDefinition}, {0}, }, @@ -123,4 +120,4 @@ void AlertNotificationService::MuteIncomingCall() { } ble_gattc_notify_custom(connectionHandle, eventHandle, om); -}
\ No newline at end of file +} |
