From 4d99d22e10a3cb2a421da1618c127128816613c9 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Tue, 26 Sep 2023 13:36:07 +1000 Subject: std::string -> std::pmr::string in psram --- src/dev_console/CMakeLists.txt | 2 +- src/dev_console/console.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/dev_console') diff --git a/src/dev_console/CMakeLists.txt b/src/dev_console/CMakeLists.txt index 74911e66..5555bf61 100644 --- a/src/dev_console/CMakeLists.txt +++ b/src/dev_console/CMakeLists.txt @@ -5,5 +5,5 @@ idf_component_register( SRCS "console.cpp" INCLUDE_DIRS "include" - REQUIRES "console") + REQUIRES "console" "memory") target_compile_options(${COMPONENT_LIB} PRIVATE ${EXTRA_WARNINGS}) diff --git a/src/dev_console/console.cpp b/src/dev_console/console.cpp index 66fb6bf6..f2b1efea 100644 --- a/src/dev_console/console.cpp +++ b/src/dev_console/console.cpp @@ -16,16 +16,18 @@ #include "esp_log.h" #include "esp_system.h" +#include "memory_resource.hpp" + namespace console { int CmdLogLevel(int argc, char** argv) { - static const std::string usage = + static const std::pmr::string usage = "usage: loglevel [VERBOSE,DEBUG,INFO,WARN,ERROR,NONE]"; if (argc != 2) { std::cout << usage << std::endl; return 1; } - std::string level_str = argv[1]; + std::pmr::string level_str = argv[1]; std::transform(level_str.begin(), level_str.end(), level_str.begin(), [](unsigned char c) { return std::toupper(c); }); -- cgit v1.2.3