mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
tagged_cmd use const string &
This commit is contained in:
@@ -453,7 +453,7 @@ void Command::erase_command(const uint8_t device_type, const char * cmd, uint8_t
|
||||
}
|
||||
|
||||
// get the tagged command
|
||||
std::string Command::tagged_cmd(std::string cmd, const uint8_t flag) {
|
||||
std::string Command::tagged_cmd(const std::string & cmd, const uint8_t flag) {
|
||||
switch (flag & 0x3F) {
|
||||
case CommandFlag::CMD_FLAG_HC:
|
||||
return "[hc<n>.]" + cmd;
|
||||
|
||||
@@ -124,7 +124,7 @@ class Command {
|
||||
|
||||
static void show_all(uuid::console::Shell & shell);
|
||||
static Command::CmdFunction * find_command(const uint8_t device_type, const uint8_t device_id, const char * cmd, const uint8_t flag);
|
||||
static std::string tagged_cmd(std::string cmd, const uint8_t flag);
|
||||
static std::string tagged_cmd(const std::string & cmd, const uint8_t flag);
|
||||
|
||||
static void erase_command(const uint8_t device_type, const char * cmd, uint8_t flag = CommandFlag::CMD_FLAG_DEFAULT);
|
||||
static void show(uuid::console::Shell & shell, uint8_t device_type, bool verbose);
|
||||
|
||||
Reference in New Issue
Block a user