| Index: device/bluetooth/bluetooth_remote_gatt_service_mac.mm
|
| diff --git a/device/bluetooth/bluetooth_remote_gatt_service_mac.mm b/device/bluetooth/bluetooth_remote_gatt_service_mac.mm
|
| index a7bbeee2b5fd6e0b1b3806f6ecc511aadc9b44f6..613f4dce767eab387903747bcc1b9eb2cc288702 100644
|
| --- a/device/bluetooth/bluetooth_remote_gatt_service_mac.mm
|
| +++ b/device/bluetooth/bluetooth_remote_gatt_service_mac.mm
|
| @@ -192,14 +192,14 @@ CBService* BluetoothRemoteGattServiceMac::GetService() const {
|
|
|
| BluetoothRemoteGattCharacteristicMac*
|
| BluetoothRemoteGattServiceMac::GetBluetoothRemoteGattCharacteristicMac(
|
| - CBCharacteristic* characteristic) const {
|
| + CBCharacteristic* cb_characteristic) const {
|
| auto found = std::find_if(
|
| gatt_characteristic_macs_.begin(), gatt_characteristic_macs_.end(),
|
| - [characteristic](
|
| + [cb_characteristic](
|
| const std::pair<
|
| const std::string,
|
| std::unique_ptr<BluetoothRemoteGattCharacteristicMac>>& pair) {
|
| - return pair.second->GetCBCharacteristic() == characteristic;
|
| + return pair.second->GetCBCharacteristic() == cb_characteristic;
|
| });
|
| if (found == gatt_characteristic_macs_.end()) {
|
| return nullptr;
|
| @@ -208,6 +208,19 @@ BluetoothRemoteGattServiceMac::GetBluetoothRemoteGattCharacteristicMac(
|
| }
|
| }
|
|
|
| +BluetoothRemoteGattDescriptorMac*
|
| +BluetoothRemoteGattServiceMac::GetBluetoothRemoteGattDescriptorMac(
|
| + CBDescriptor* cb_descriptor) const {
|
| + CBCharacteristic* cb_characteristic = [cb_descriptor characteristic];
|
| + BluetoothRemoteGattCharacteristicMac* gatt_characteristic_mac =
|
| + GetBluetoothRemoteGattCharacteristicMac(cb_characteristic);
|
| + if (!gatt_characteristic_mac) {
|
| + return nullptr;
|
| + }
|
| + return gatt_characteristic_mac->GetBluetoothRemoteGattDescriptorMac(
|
| + cb_descriptor);
|
| +}
|
| +
|
| DEVICE_BLUETOOTH_EXPORT std::ostream& operator<<(
|
| std::ostream& out,
|
| const BluetoothRemoteGattServiceMac& service) {
|
|
|