High level Bluetooth Low Energy API and radio abstraction layer

Dependencies:   nRF51822

Dependents:   LinkNode_LIS3DH

Fork of BLE_API by Bluetooth Low Energy

Files at this revision

API Documentation at this revision

Comitter:
Rohit Grover
Date:
Wed May 28 16:52:09 2014 +0100
Parent:
50:9078969e80e4
Child:
52:62b9d3b7a689
Commit message:
use initializer list in the constructor for GattCharacteristic

Changed in this revision

GattCharacteristic.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/GattCharacteristic.cpp	Wed May 28 15:25:55 2014 +0100
+++ b/GattCharacteristic.cpp	Wed May 28 16:52:09 2014 +0100
@@ -49,13 +49,14 @@
 GattCharacteristic::GattCharacteristic(uint16_t id,
                                        uint16_t minLen,
                                        uint16_t maxLen,
-                                       uint8_t  props)
+                                       uint8_t  props) :
+    uuid(id),
+    lenMin(minLen),
+    lenMax(maxLen),
+    handle(),
+    properties(props)
 {
-    uuid = id;
-    memcpy(&properties, &props, 1);
-    lenMin = minLen;
-    lenMax = maxLen;
-    //    handle = 0;
+    /* empty */
 }
 
 /**************************************************************************/