From e6c44ac779e7b13333f7343554306e2eab308c24 Mon Sep 17 00:00:00 2001 From: Rohit Grover Date: Wed, 6 May 2015 16:04:33 +0100 Subject: [PATCH] add copy and default constructors for UUID. --- public/UUID.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/public/UUID.h b/public/UUID.h index 6b39fd1..d7acda8 100644 --- a/public/UUID.h +++ b/public/UUID.h @@ -77,6 +77,16 @@ public: /* empty */ } + UUID(const UUID &source) { + type = source.type; + shortUUID = source.shortUUID; + memcpy(baseUUID, source.baseUUID, LENGTH_OF_LONG_UUID); + } + + UUID(void) : type(UUID_TYPE_SHORT), shortUUID(BLE_UUID_UNKNOWN) { + /* empty */ + } + public: UUID_Type_t shortOrLong(void) const {return type; } const uint8_t *getBaseUUID(void) const {