diff options
| author | JF <JF002@users.noreply.github.com> | 2021-10-09 19:53:41 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-09 19:53:41 +0200 |
| commit | f99f71cc6ef34ba76ed63decd0ba47f26c544dcc (patch) | |
| tree | ecc7452f90b1b67ca270eba353acf0d70a4465af /src/components/ble/CurrentTimeClient.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/CurrentTimeClient.cpp')
| -rw-r--r-- | src/components/ble/CurrentTimeClient.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/components/ble/CurrentTimeClient.cpp b/src/components/ble/CurrentTimeClient.cpp index c6e68312..90d1f0c7 100644 --- a/src/components/ble/CurrentTimeClient.cpp +++ b/src/components/ble/CurrentTimeClient.cpp @@ -47,7 +47,7 @@ bool CurrentTimeClient::OnDiscoveryEvent(uint16_t connectionHandle, const ble_ga return true; } - if (service != nullptr && ble_uuid_cmp(((ble_uuid_t*) &ctsServiceUuid), &service->uuid.u) == 0) { + if (service != nullptr && ble_uuid_cmp(&ctsServiceUuid.u, &service->uuid.u) == 0) { NRF_LOG_INFO("CTS discovered : 0x%x - 0x%x", service->start_handle, service->end_handle); isDiscovered = true; ctsStartHandle = service->start_handle; @@ -72,7 +72,7 @@ int CurrentTimeClient::OnCharacteristicDiscoveryEvent(uint16_t conn_handle, return 0; } - if (characteristic != nullptr && ble_uuid_cmp(((ble_uuid_t*) ¤tTimeCharacteristicUuid), &characteristic->uuid.u) == 0) { + if (characteristic != nullptr && ble_uuid_cmp(¤tTimeCharacteristicUuid.u, &characteristic->uuid.u) == 0) { NRF_LOG_INFO("CTS Characteristic discovered : 0x%x", characteristic->val_handle); isCharacteristicDiscovered = true; currentTimeHandle = characteristic->val_handle; |
