summaryrefslogtreecommitdiff
path: root/src/components/ble/HeartRateService.cpp
diff options
context:
space:
mode:
authorJonathan Vander Mey <jvandermey@evertz.com>2021-07-24 11:40:06 -0400
committerJonathan Vander Mey <jvandermey@evertz.com>2021-07-24 11:40:06 -0400
commit487ae478adf4f4c8be0ff61f8433e7018426b661 (patch)
tree231c88a28e515d59632d27150816db599150cd66 /src/components/ble/HeartRateService.cpp
parent1ba99d242788b50b26b739d571d4866a6c2d0fed (diff)
Remove unnecessary C-style casts with BLE UUIDs
Instead of casting the UUID object to the ble_uuid_t* used throughout the NimBLE API just pass the address of the ble_uuid_t member that's at the start of each of the UUID structs.
Diffstat (limited to 'src/components/ble/HeartRateService.cpp')
-rw-r--r--src/components/ble/HeartRateService.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/components/ble/HeartRateService.cpp b/src/components/ble/HeartRateService.cpp
index c556566b..5b00f492 100644
--- a/src/components/ble/HeartRateService.cpp
+++ b/src/components/ble/HeartRateService.cpp
@@ -18,7 +18,7 @@ namespace {
HeartRateService::HeartRateService(Pinetime::System::SystemTask& system, Controllers::HeartRateController& heartRateController)
: system {system},
heartRateController {heartRateController},
- characteristicDefinition {{.uuid = (ble_uuid_t*) &heartRateMeasurementUuid,
+ characteristicDefinition {{.uuid = &heartRateMeasurementUuid.u,
.access_cb = HeartRateServiceServiceCallback,
.arg = this,
.flags = BLE_GATT_CHR_F_READ | BLE_GATT_CHR_F_NOTIFY,
@@ -27,7 +27,7 @@ HeartRateService::HeartRateService(Pinetime::System::SystemTask& system, Control
serviceDefinition {
{/* Device Information Service */
.type = BLE_GATT_SVC_TYPE_PRIMARY,
- .uuid = (ble_uuid_t*) &heartRateServiceUuid,
+ .uuid = &heartRateServiceUuid.u,
.characteristics = characteristicDefinition},
{0},
} {