mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
replace std::string with const char #869
This commit is contained in:
@@ -416,7 +416,9 @@ bool Command::list(const uint8_t device_type, JsonObject & output) {
|
||||
for (const auto & cf : cmdfunctions_) {
|
||||
if ((cf.device_type_ == device_type) && !cf.has_flags(CommandFlag::HIDDEN) && cf.description_ && (cl == std::string(cf.cmd_))) {
|
||||
if (cf.has_flags(CommandFlag::MQTT_SUB_FLAG_WW)) {
|
||||
output[cl] = EMSdevice::tag_to_string(DeviceValueTAG::TAG_DEVICE_DATA_WW) + " " + Helpers::translated_word(cf.description_);
|
||||
char s[100];
|
||||
snprintf(s, sizeof(s), "%s %s", EMSdevice::tag_to_string(DeviceValueTAG::TAG_DEVICE_DATA_WW), Helpers::translated_word(cf.description_));
|
||||
output[cl] = s;
|
||||
} else {
|
||||
output[cl] = Helpers::translated_word(cf.description_);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user