1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-31 23:21:54 +00:00

drop double copy

This commit is contained in:
J. Nick Koston
2025-10-21 12:58:15 -10:00
parent bfacb8d363
commit bfd115d25c
2 changed files with 2 additions and 2 deletions

View File

@@ -3,7 +3,7 @@
namespace esphome { namespace esphome {
namespace select { namespace select {
void SelectTraits::set_options(std::initializer_list<std::string> options) { this->options_ = options; } void SelectTraits::set_options(const std::initializer_list<std::string> &options) { this->options_ = options; }
const FixedVector<std::string> &SelectTraits::get_options() const { return this->options_; } const FixedVector<std::string> &SelectTraits::get_options() const { return this->options_; }

View File

@@ -9,7 +9,7 @@ namespace select {
class SelectTraits { class SelectTraits {
public: public:
void set_options(std::initializer_list<std::string> options); void set_options(const std::initializer_list<std::string> &options);
const FixedVector<std::string> &get_options() const; const FixedVector<std::string> &get_options() const;
/// Copy options from another SelectTraits (for copy_select, lvgl) /// Copy options from another SelectTraits (for copy_select, lvgl)
void copy_options(const FixedVector<std::string> &other) { this->options_.copy_from(other); } void copy_options(const FixedVector<std::string> &other) { this->options_.copy_from(other); }