From da7f24c126bf80a61094f148f0a1936dcc06daf9 Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Fri, 6 Mar 2026 11:52:52 -0500 Subject: [PATCH] Fix the const. --- src/ai/ai.cpp | 6 ++++-- src/ai/ai.hpp | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) 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);