From 08c193d1d82acb6cc532a657be6a0ab7347d41fb Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 19 Feb 2026 15:02:36 -0600 Subject: [PATCH] [light] Fix clang-format in gamma_table_reverse_search Add braces to if/else in inline binary search function to satisfy clang-format requirements. --- esphome/components/light/esp_color_correction.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/esphome/components/light/esp_color_correction.h b/esphome/components/light/esp_color_correction.h index 2905a9f9c5..48ecc46364 100644 --- a/esphome/components/light/esp_color_correction.h +++ b/esphome/components/light/esp_color_correction.h @@ -11,10 +11,11 @@ inline uint8_t gamma_table_reverse_search(const uint16_t *table, uint16_t target uint8_t lo = 0, hi = 255; while (lo < hi) { uint8_t mid = (lo + hi + 1) / 2; - if (progmem_read_uint16(&table[mid]) <= target) + if (progmem_read_uint16(&table[mid]) <= target) { lo = mid; - else + } else { hi = mid - 1; + } } return lo; }