1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-26 12:43:48 +00:00

Replace std::move() with const references where possible (#2421)

* Replace std::move() with const references where possible

* Fix formatting
This commit is contained in:
Oxan van Leeuwen
2021-09-30 16:25:08 +02:00
committed by GitHub
parent 0e4f1ac40d
commit 5b0fbbaada
8 changed files with 10 additions and 11 deletions

View File

@@ -10,7 +10,7 @@ namespace select {
class SelectStateTrigger : public Trigger<std::string> {
public:
explicit SelectStateTrigger(Select *parent) {
parent->add_on_state_callback([this](std::string value) { this->trigger(std::move(value)); });
parent->add_on_state_callback([this](const std::string &value) { this->trigger(value); });
}
};