Skip to content
This repository was archived by the owner on Apr 23, 2023. It is now read-only.

Commit abc5cd8

Browse files
committed
Passing string by value
1 parent 6774550 commit abc5cd8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cpp_utils/BLECharacteristic.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ void BLECharacteristic::setValue(uint8_t* data, size_t length) {
657657
* @param [in] Set the value of the characteristic.
658658
* @return N/A.
659659
*/
660-
void BLECharacteristic::setValue(std::string& value) {
660+
void BLECharacteristic::setValue(std::string value) {
661661
setValue((uint8_t*)(value.data()), value.length());
662662
} // setValue
663663

cpp_utils/BLECharacteristic.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class BLECharacteristic {
7171
void setNotifyProperty(bool value);
7272
void setReadProperty(bool value);
7373
void setValue(uint8_t* data, size_t size);
74-
void setValue(std::string& value);
74+
void setValue(std::string value);
7575
void setValue(uint16_t data16);
7676
void setValue(uint32_t data32);
7777
void setValue(int data32);

0 commit comments

Comments
 (0)