Cristi Stoican / BLE_API

Dependents:   Migration

Fork of BLE_API by Bluetooth Low Energy

Files at this revision

API Documentation at this revision

Comitter:
rgrover1
Date:
Fri Nov 28 14:11:24 2014 +0000
Parent:
189:a23091b54ab5
Child:
191:6710298104b0
Commit message:
Synchronized with git rev 5cd5f364
Author: Rohit Grover
minor cosmetic use of reinterpret_cast.

Changed in this revision

services/URIBeacon2Service.h Show annotated file Show diff for this revision Revisions of this file
--- a/services/URIBeacon2Service.h	Fri Nov 28 14:11:24 2014 +0000
+++ b/services/URIBeacon2Service.h	Fri Nov 28 14:11:24 2014 +0000
@@ -316,7 +316,7 @@
         } else if (params->charHandle == beaconPeriodChar.getValueAttribute().getHandle()) {
             if (lockedState) { /* When locked, the device isn't allowed to update the characteristic. */
                 /* Restore GATT database with previous value. */
-                ble.updateCharacteristicValue(beaconPeriodChar.getValueAttribute().getHandle(), (uint8_t *)&beaconPeriod, 2 /* size */);
+                ble.updateCharacteristicValue(beaconPeriodChar.getValueAttribute().getHandle(), reinterpret_cast<uint8_t *>(&beaconPeriod), sizeof(uint16_t));
                 return;
             } else {
                 beaconPeriod = *((uint16_t *)(params->data));