diff --git a/src/ai/ai.cpp b/src/ai/ai.cpp index 132d2f0..1df9c07 100644 --- a/src/ai/ai.cpp +++ b/src/ai/ai.cpp @@ -65,7 +65,7 @@ namespace ai { AIMGR.profile = json({}); } - void init(std::string config_path) { + void init(const std::string& config_path) { if(!initialized) { auto config = settings::get(config_path); @@ -106,7 +106,9 @@ namespace ai { } initialized = true; } else { - dbc::sentinel("DOUBLE INIT: AI manager should only be intialized once if not in tests."); + // BUG: should track the inits per file, or create a separate init that's an overload of the default + // then this version is just used in tests + dbc::sentinel($F("DOUBLE INIT {}: AI manager should only be intialized once if not in tests.", config_path)); } } diff --git a/src/ai/ai.hpp b/src/ai/ai.hpp index 3e0fd81..fcf007c 100644 --- a/src/ai/ai.hpp +++ b/src/ai/ai.hpp @@ -46,7 +46,7 @@ namespace ai { /* This is really only used in test to load different fixtures. */ void reset(); - void init(std::string config_path); + void init(const std::string& config_path); Action config_action(AIProfile& profile, nlohmann::json& config); State config_state(AIProfile& profile, nlohmann::json& config);