mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
minor changes, make cppcheck happy
This commit is contained in:
@@ -54,7 +54,7 @@ uuid::log::Logger Mqtt::logger_{F_(mqtt), uuid::log::Facility::DAEMON};
|
||||
|
||||
// subscribe to an MQTT topic, and store the associated callback function
|
||||
// only if it already hasn't been added
|
||||
void Mqtt::subscribe(const uint8_t device_type, const std::string & topic, mqtt_subfunction_p cb) {
|
||||
void Mqtt::subscribe(const uint8_t device_type, const std::string & topic, mqtt_sub_function_p cb) {
|
||||
// check if we already have the topic subscribed, if so don't add it again
|
||||
if (!mqtt_subfunctions_.empty()) {
|
||||
for (auto & mqtt_subfunction : mqtt_subfunctions_) {
|
||||
@@ -126,7 +126,7 @@ void Mqtt::register_command(const uint8_t device_type, const __FlashStringHelper
|
||||
|
||||
// subscribe to an MQTT topic, and store the associated callback function
|
||||
// For generic functions not tied to a specific device
|
||||
void Mqtt::subscribe(const std::string & topic, mqtt_subfunction_p cb) {
|
||||
void Mqtt::subscribe(const std::string & topic, mqtt_sub_function_p cb) {
|
||||
subscribe(0, topic, cb); // no device_id needed if generic to EMS-ESP
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user