mirror of
https://github.com/esphome/esphome.git
synced 2026-08-22 22:26:21 +00:00
[bk72xx_ble_tracker] Brace single-statement loop flagged by clang-tidy (#18070)
This commit is contained in:
@@ -171,9 +171,11 @@ void BK72xxBLETracker::on_scan_report(const bk72xx_ble::BLEScanReport &report) {
|
|||||||
ble_device_base::ESPBTDevice device;
|
ble_device_base::ESPBTDevice device;
|
||||||
device.from_scan_result(report.mac, report.rssi, report.addr_type, report.data, report.data_len);
|
device.from_scan_result(report.mac, report.rssi, report.addr_type, report.data, report.data_len);
|
||||||
bool found = false;
|
bool found = false;
|
||||||
for (auto *listener : this->listeners_)
|
for (auto *listener : this->listeners_) {
|
||||||
if (listener->parse_device(device))
|
if (listener->parse_device(device)) {
|
||||||
found = true;
|
found = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
// Mirror esp32_ble_tracker: log a newly-seen device only when nothing claimed
|
// Mirror esp32_ble_tracker: log a newly-seen device only when nothing claimed
|
||||||
// it and the scan is one-shot (continuous scans would spam).
|
// it and the scan is one-shot (continuous scans would spam).
|
||||||
if (!found && !this->scan_continuous_)
|
if (!found && !this->scan_continuous_)
|
||||||
|
|||||||
Reference in New Issue
Block a user