forked from h2zero/esp-nimble-cpp
Add ==,!= operators to NimBLEAddress, pass parameters by const reference.
This commit is contained in:
@@ -43,7 +43,7 @@ NimBLEService::NimBLEService(const char* uuid, uint16_t numHandles, NimBLEServer
|
||||
* @param [in] uuid The UUID of the service.
|
||||
* @param [in] numHandles The maximum number of handles associated with the service.
|
||||
*/
|
||||
NimBLEService::NimBLEService(NimBLEUUID uuid, uint16_t numHandles, NimBLEServer* pServer) {
|
||||
NimBLEService::NimBLEService(const NimBLEUUID &uuid, uint16_t numHandles, NimBLEServer* pServer) {
|
||||
m_uuid = uuid;
|
||||
m_handle = NULL_HANDLE;
|
||||
m_pServer = pServer;
|
||||
@@ -247,7 +247,7 @@ NimBLECharacteristic* NimBLEService::createCharacteristic(const char* uuid, uint
|
||||
* @param [in] properties - The properties of the characteristic.
|
||||
* @return The new BLE characteristic.
|
||||
*/
|
||||
NimBLECharacteristic* NimBLEService::createCharacteristic(NimBLEUUID uuid, uint32_t properties) {
|
||||
NimBLECharacteristic* NimBLEService::createCharacteristic(const NimBLEUUID &uuid, uint32_t properties) {
|
||||
NimBLECharacteristic* pCharacteristic = new NimBLECharacteristic(uuid, properties, this);
|
||||
addCharacteristic(pCharacteristic);
|
||||
//pCharacteristic->executeCreate(this);
|
||||
@@ -260,7 +260,7 @@ NimBLECharacteristic* NimBLEService::getCharacteristic(const char* uuid) {
|
||||
}
|
||||
|
||||
|
||||
NimBLECharacteristic* NimBLEService::getCharacteristic(NimBLEUUID uuid) {
|
||||
NimBLECharacteristic* NimBLEService::getCharacteristic(const NimBLEUUID &uuid) {
|
||||
return m_characteristicMap.getByUUID(uuid);
|
||||
}
|
||||
|
||||
@@ -290,4 +290,4 @@ NimBLEServer* NimBLEService::getServer() {
|
||||
return m_pServer;
|
||||
} // getServer
|
||||
|
||||
#endif // CONFIG_BT_ENABLED
|
||||
#endif // CONFIG_BT_ENABLED
|
||||
|
||||
Reference in New Issue
Block a user