Reduce heap allocations by getting rid of temporary std::list and std::string

This commit is contained in:
2025-05-28 15:43:42 +02:00
parent b8cdd373f4
commit 1d49013fc6
10 changed files with 44 additions and 40 deletions
@@ -28,9 +28,9 @@ namespace dce_commands {
* @param fail_phrase String to be present in the reply to fail this command
* @param timeout_ms Timeout in ms
*/
command_result generic_command(CommandableIf *t, const std::string &command,
const std::string &pass_phrase,
const std::string &fail_phrase, uint32_t timeout_ms);
command_result generic_command(CommandableIf *t, std::string_view command,
std::string_view pass_phrase,
std::string_view fail_phrase, uint32_t timeout_ms);
/**
* @brief Declaration of all commands is generated from esp_modem_command_declare.inc
*/