From b2e949c6e90a2a8b1d3e694f85fd6fc72c73b473 Mon Sep 17 00:00:00 2001 From: Michael Davidson Date: Sat, 30 Dec 2023 11:35:42 +1100 Subject: [PATCH] Apply clang-tidy recommendation --- esphome/components/graphical_layout/text_run_panel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/components/graphical_layout/text_run_panel.cpp b/esphome/components/graphical_layout/text_run_panel.cpp index 2199ee3262..55d0713e15 100644 --- a/esphome/components/graphical_layout/text_run_panel.cpp +++ b/esphome/components/graphical_layout/text_run_panel.cpp @@ -196,7 +196,7 @@ void TextRunPanel::apply_alignment_to_layout(CalculatedLayout *calculated_layout int16_t total_line_width = 0; int16_t max_line_height = 0; int16_t max_baseline = 0; - for (auto run : line_runs) { + for (const auto &run : line_runs) { total_line_width += run->bounds.w; max_line_height = std::max(run->bounds.h, max_line_height); max_baseline = std::max(run->baseline, max_baseline);