From bfd115d25c597f2fa7df87920079cf943eda7f9a Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 21 Oct 2025 12:58:15 -1000 Subject: [PATCH] drop double copy --- esphome/components/select/select_traits.cpp | 2 +- esphome/components/select/select_traits.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/components/select/select_traits.cpp b/esphome/components/select/select_traits.cpp index 497bffbe01..a99847c398 100644 --- a/esphome/components/select/select_traits.cpp +++ b/esphome/components/select/select_traits.cpp @@ -3,7 +3,7 @@ namespace esphome { namespace select { -void SelectTraits::set_options(std::initializer_list options) { this->options_ = options; } +void SelectTraits::set_options(const std::initializer_list &options) { this->options_ = options; } const FixedVector &SelectTraits::get_options() const { return this->options_; } diff --git a/esphome/components/select/select_traits.h b/esphome/components/select/select_traits.h index 826ef14924..eb98d05958 100644 --- a/esphome/components/select/select_traits.h +++ b/esphome/components/select/select_traits.h @@ -9,7 +9,7 @@ namespace select { class SelectTraits { public: - void set_options(std::initializer_list options); + void set_options(const std::initializer_list &options); const FixedVector &get_options() const; /// Copy options from another SelectTraits (for copy_select, lvgl) void copy_options(const FixedVector &other) { this->options_.copy_from(other); }