1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-18 07:45:56 +00:00

Enable readability-const-return-type check (#3099)

This commit is contained in:
Oxan van Leeuwen
2022-01-23 08:28:00 +01:00
committed by GitHub
parent a6a9ebfde2
commit 7854522792
6 changed files with 10 additions and 11 deletions

View File

@@ -27,13 +27,13 @@ std::string MQTTComponent::get_default_topic_for_(const std::string &suffix) con
"/" + suffix;
}
const std::string MQTTComponent::get_state_topic_() const {
std::string MQTTComponent::get_state_topic_() const {
if (this->custom_state_topic_.empty())
return this->get_default_topic_for_("state");
return this->custom_state_topic_;
}
const std::string MQTTComponent::get_command_topic_() const {
std::string MQTTComponent::get_command_topic_() const {
if (this->custom_command_topic_.empty())
return this->get_default_topic_for_("command");
return this->custom_command_topic_;