From b29089e85ae6d22b8d7fa2d84bbeb49f773076ac Mon Sep 17 00:00:00 2001 From: Rohit Grover Date: Tue, 19 May 2015 09:27:55 +0100 Subject: [PATCH] minor improvements to the new APIs for getAdvParams/Data(). --- public/BLEDevice.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/public/BLEDevice.h b/public/BLEDevice.h index a0b7d26..d7c060d 100644 --- a/public/BLEDevice.h +++ b/public/BLEDevice.h @@ -139,7 +139,7 @@ public: * @return Read back advertising parameters. Useful for storing and * restoring parameters rapidly. */ - GapAdvertisingParams getAdvertisingParams(void); + const GapAdvertisingParams &getAdvertisingParams(void) const; /** * This API is typically used as an internal helper to udpate the transport @@ -160,7 +160,7 @@ public: * @return Read back advertising data. Useful for storing and * restoring payload. */ - GapAdvertisingData getAdvertisingData(void); + const GapAdvertisingData &getAdvertisingData(void) const; /** * Reset any advertising payload prepared from prior calls to @@ -696,8 +696,8 @@ BLEDevice::setAdvertisingParams(const GapAdvertisingParams &newAdvParams) advParams = newAdvParams; } -inline GapAdvertisingParams -BLEDevice::getAdvertisingParams(void) +inline const GapAdvertisingParams & +BLEDevice::getAdvertisingParams(void) const { return advParams; } @@ -769,8 +769,8 @@ BLEDevice::setAdvertisingData(const GapAdvertisingData& newPayload) return setAdvertisingPayload(); } -inline GapAdvertisingData -BLEDevice::getAdvertisingData(void) { +inline const GapAdvertisingData & +BLEDevice::getAdvertisingData(void) const { return advPayload; }