Chromium Code Reviews| Index: device/bluetooth/bluetooth_discovery_filter.cc |
| diff --git a/device/bluetooth/bluetooth_discovery_filter.cc b/device/bluetooth/bluetooth_discovery_filter.cc |
| index 8a6cc0b9fda69298f42624284f665748ee3f67c9..8edf4383d11cda2053e2a4e9f3b4b816d5882ab9 100644 |
| --- a/device/bluetooth/bluetooth_discovery_filter.cc |
| +++ b/device/bluetooth/bluetooth_discovery_filter.cc |
| @@ -64,18 +64,18 @@ void BluetoothDiscoveryFilter::GetUUIDs( |
| std::set<device::BluetoothUUID>& out_uuids) const { |
| out_uuids.clear(); |
| - for (auto* uuid : uuids_) |
| - out_uuids.insert(*uuid); |
| + for (auto uuid : uuids_) |
|
Reilly Grant (use Gerrit)
2016/12/21 22:25:14
const auto&
dougt
2016/12/22 01:18:02
Done.
|
| + out_uuids.insert(uuid); |
| } |
| void BluetoothDiscoveryFilter::AddUUID(const device::BluetoothUUID& uuid) { |
| DCHECK(uuid.IsValid()); |
| - for (auto* uuid_it : uuids_) { |
| - if (*uuid_it == uuid) |
| + for (auto uuid_it : uuids_) { |
|
Reilly Grant (use Gerrit)
2016/12/21 22:25:14
const auto&
dougt
2016/12/22 01:18:02
Done.
|
| + if (uuid_it == uuid) |
| return; |
| } |
| - uuids_.push_back(new device::BluetoothUUID(uuid)); |
| + uuids_.push_back(uuid); |
| } |
| void BluetoothDiscoveryFilter::CopyFrom( |
| @@ -83,8 +83,8 @@ void BluetoothDiscoveryFilter::CopyFrom( |
| transport_ = filter.transport_; |
| if (filter.uuids_.size()) { |
| - for (auto* uuid : filter.uuids_) |
| - AddUUID(*uuid); |
| + for (auto uuid : filter.uuids_) |
|
Reilly Grant (use Gerrit)
2016/12/21 22:25:14
const auto&
dougt
2016/12/22 01:18:02
Done.
|
| + AddUUID(uuid); |
| } else |
| uuids_.clear(); |