mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
Function parameter 'sensor' should be passed by const reference
This commit is contained in:
@@ -231,7 +231,7 @@ bool AnalogSensor::updated_values() {
|
||||
}
|
||||
|
||||
// publish a single sensor to MQTT
|
||||
void AnalogSensor::publish_sensor(Sensor sensor) {
|
||||
void AnalogSensor::publish_sensor(const Sensor & sensor) {
|
||||
if (Mqtt::publish_single()) {
|
||||
char topic[Mqtt::MQTT_TOPIC_MAX_SIZE];
|
||||
snprintf(topic, sizeof(topic), "%s/%s", read_flash_string(F_(analogsensor)).c_str(), sensor.name().c_str());
|
||||
|
||||
Reference in New Issue
Block a user