mirror of
https://github.com/esphome/esphome.git
synced 2025-10-25 21:23:53 +01:00
Enable readability-qualified-auto check (#3095)
This commit is contained in:
@@ -104,7 +104,7 @@ void IRAM_ATTR HOT RotaryEncoderSensorStore::gpio_intr(RotaryEncoderSensorStore
|
||||
}
|
||||
|
||||
if (rotation_dir != 0) {
|
||||
auto first_zero = std::find(arg->rotation_events.begin(), arg->rotation_events.end(), 0); // find first zero
|
||||
auto *first_zero = std::find(arg->rotation_events.begin(), arg->rotation_events.end(), 0); // find first zero
|
||||
if (first_zero == arg->rotation_events.begin() // are we at the start (first event this loop iteration)
|
||||
|| std::signbit(*std::prev(first_zero)) !=
|
||||
std::signbit(rotation_dir) // or is the last stored event the wrong direction
|
||||
|
||||
Reference in New Issue
Block a user