BLE_API_Tiny_BLE

Dependents:   CSSE4011_BLE_IMU

Fork of BLE_API by Bluetooth Low Energy

Revision:
53:a1bec483c8e3
Parent:
34:da2ea8cd6216
Child:
54:7014517e2d60
--- a/GattService.cpp	Wed May 28 17:24:30 2014 +0100
+++ b/GattService.cpp	Thu May 29 08:16:31 2014 +0100
@@ -36,11 +36,13 @@
     @endcode
 */
 /**************************************************************************/
-GattService::GattService(uint8_t base_uuid[16])
+GattService::GattService(uint8_t base_uuid[16]) :
+    primaryServiceID(base_uuid),
+    characteristicCount(0),
+    characteristics(),
+    handle(0)
 {
-    primaryServiceID.update(base_uuid);
-    characteristicCount = 0;
-    handle              = 0;
+    /* empty */
 }
 
 /**************************************************************************/
@@ -58,11 +60,12 @@
     @endcode
 */
 /**************************************************************************/
-GattService::GattService(uint16_t ble_uuid)
+GattService::GattService(uint16_t ble_uuid) :
+    primaryServiceID(ble_uuid),
+    characteristicCount(0),
+    characteristics(),
+    handle(0)
 {
-    primaryServiceID.update( ble_uuid );
-    characteristicCount = 0;
-    handle              = 0;
 }
 
 /**************************************************************************/