mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2024-11-25 14:40:55 +01:00
Add const to NimBLEAdvertisedDevice* in NimBLEClient::connect overload
Fixes an issue where the wrong connect overload is called if the NimBLEAdvertisedDevice* passed is const.
This commit is contained in:
parent
1b0abd273f
commit
41a7aa8eb5
2 changed files with 5 additions and 5 deletions
|
@ -147,7 +147,7 @@ bool NimBLEClient::connect(bool deleteAttributes, bool asyncConnect, bool exchan
|
|||
* If false, the client will use the default MTU size and the application will need to call exchangeMTU() later.
|
||||
* @return true on success.
|
||||
*/
|
||||
bool NimBLEClient::connect(NimBLEAdvertisedDevice* device, bool deleteAttributes, bool asyncConnect, bool exchangeMTU) {
|
||||
bool NimBLEClient::connect(const NimBLEAdvertisedDevice* device, bool deleteAttributes, bool asyncConnect, bool exchangeMTU) {
|
||||
NimBLEAddress address(device->getAddress());
|
||||
return connect(address, deleteAttributes, asyncConnect, exchangeMTU);
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ struct NimBLETaskData;
|
|||
*/
|
||||
class NimBLEClient {
|
||||
public:
|
||||
bool connect(NimBLEAdvertisedDevice* device,
|
||||
bool connect(const NimBLEAdvertisedDevice* device,
|
||||
bool deleteAttributes = true,
|
||||
bool asyncConnect = false,
|
||||
bool exchangeMTU = true);
|
||||
|
|
Loading…
Reference in a new issue