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
+1 -1
View File
@@ -74,7 +74,7 @@ class Sim800LReceivedMessageTrigger : public Trigger<std::string, std::string> {
public:
explicit Sim800LReceivedMessageTrigger(Sim800LComponent *parent) {
parent->add_on_sms_received_callback(
[this](std::string message, std::string sender) { this->trigger(std::move(message), std::move(sender)); });
[this](const std::string &message, const std::string &sender) { this->trigger(message, sender); });
}
};