Add ==,!= operators to NimBLEAddress, pass parameters by const reference.

This commit is contained in:
h2zero
2020-05-10 07:21:46 -06:00
parent fba7e0fd68
commit f0191eb1e6
41 changed files with 217 additions and 183 deletions

View File

@@ -62,7 +62,7 @@ NimBLEService* NimBLEServer::createService(const char* uuid) {
* @param [in] inst_id With multiple services with the same UUID we need to provide inst_id value different for each service.
* @return A reference to the new service object.
*/
NimBLEService* NimBLEServer::createService(NimBLEUUID uuid, uint32_t numHandles, uint8_t inst_id) {
NimBLEService* NimBLEServer::createService(const NimBLEUUID &uuid, uint32_t numHandles, uint8_t inst_id) {
NIMBLE_LOGD(LOG_TAG, ">> createService - %s", uuid.toString().c_str());
// Check that a service with the supplied UUID does not already exist.
@@ -95,7 +95,7 @@ NimBLEService* NimBLEServer::getServiceByUUID(const char* uuid) {
* @param [in] uuid The UUID of the new service.
* @return A reference to the service object.
*/
NimBLEService* NimBLEServer::getServiceByUUID(NimBLEUUID uuid) {
NimBLEService* NimBLEServer::getServiceByUUID(const NimBLEUUID &uuid) {
return m_serviceMap.getByUUID(uuid);
}
@@ -605,4 +605,4 @@ void NimBLEServer::onHostReset() {
}
*/
#endif // CONFIG_BT_ENABLED
#endif // CONFIG_BT_ENABLED