Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(573)

Unified Diff: components/proximity_auth/ble/bluetooth_low_energy_connection_finder.cc

Issue 2110663002: components: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase+one fix Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/proximity_auth/ble/bluetooth_low_energy_connection_finder.cc
diff --git a/components/proximity_auth/ble/bluetooth_low_energy_connection_finder.cc b/components/proximity_auth/ble/bluetooth_low_energy_connection_finder.cc
index d1aaae62f9453091df1beb6a96c8f483dec4f897..f13635443788c77a8edde52456cad872b9f235ee 100644
--- a/components/proximity_auth/ble/bluetooth_low_energy_connection_finder.cc
+++ b/components/proximity_auth/ble/bluetooth_low_energy_connection_finder.cc
@@ -197,7 +197,7 @@ void BluetoothLowEnergyConnectionFinder::OnAdapterInitialized(
if (finder_strategy_ == FIND_PAIRED_DEVICE) {
PA_LOG(INFO) << "Looking for paired device: "
<< remote_device_.bluetooth_address;
- for (auto& device : adapter_->GetDevices()) {
+ for (const auto* device : adapter_->GetDevices()) {
if (device->IsPaired())
PA_LOG(INFO) << device->GetAddress() << " is paired";
}
@@ -306,7 +306,7 @@ BluetoothDevice* BluetoothLowEnergyConnectionFinder::GetDevice(
// This is a bug in the way device::BluetoothAdapter is storing the devices
// (see crbug.com/497841).
std::vector<BluetoothDevice*> devices = adapter_->GetDevices();
- for (const auto& device : devices) {
+ for (auto* device : devices) {
if (device->GetAddress() == device_address)
return device;
}

Powered by Google App Engine
This is Rietveld 408576698