Fix the const.

This commit is contained in:
Zed A. Shaw 2026-03-06 11:52:52 -05:00
parent 13d1f54f09
commit da7f24c126
2 changed files with 5 additions and 3 deletions

View file

@ -65,7 +65,7 @@ namespace ai {
AIMGR.profile = json({}); AIMGR.profile = json({});
} }
void init(std::string config_path) { void init(const std::string& config_path) {
if(!initialized) { if(!initialized) {
auto config = settings::get(config_path); auto config = settings::get(config_path);
@ -106,7 +106,9 @@ namespace ai {
} }
initialized = true; initialized = true;
} else { } 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));
} }
} }

View file

@ -46,7 +46,7 @@ namespace ai {
/* This is really only used in test to load different fixtures. */ /* This is really only used in test to load different fixtures. */
void reset(); void reset();
void init(std::string config_path); void init(const std::string& config_path);
Action config_action(AIProfile& profile, nlohmann::json& config); Action config_action(AIProfile& profile, nlohmann::json& config);
State config_state(AIProfile& profile, nlohmann::json& config); State config_state(AIProfile& profile, nlohmann::json& config);