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
+2 -2
View File
@@ -236,7 +236,7 @@ int NimBLERemoteDescriptor::onWriteCB(uint16_t conn_handle,
* @param [in] length The length of the data to send.
* @param [in] response True if we expect a response.
*/
bool NimBLERemoteDescriptor::writeValue(uint8_t* data, size_t length, bool response) {
bool NimBLERemoteDescriptor::writeValue(const uint8_t* data, size_t length, bool response) {
NIMBLE_LOGD(LOG_TAG, ">> Descriptor writeValue: %s", toString().c_str());
@@ -317,7 +317,7 @@ bool NimBLERemoteDescriptor::writeValue(uint8_t* data, size_t length, bool respo
* @param [in] newValue The data to send to the remote descriptor.
* @param [in] response True if we expect a response.
*/
bool NimBLERemoteDescriptor::writeValue(std::string newValue, bool response) {
bool NimBLERemoteDescriptor::writeValue(const std::string &newValue, bool response) {
return writeValue((uint8_t*) newValue.data(), newValue.length(), response);
} // writeValue