#include #include #include #include #include namespace sscl { std::string ComponentThread::getThreadName(sscl::ThreadId id) { // Cast ThreadId to SmoThreadId for validation and lookup smo::SmoThreadId smoId = static_cast(id); if (static_cast(smoId) >= static_cast(smo::SmoThreadId::N_ITEMS)) { throw std::runtime_error(std::string(__func__) + ": Invalid thread ID"); } // Use function-local static to ensure proper initialization order static const std::string threadNames[static_cast(smo::SmoThreadId::N_ITEMS)] = { "mrntt", "director", "simulator", "subconscious", "body", "world" }; return threadNames[static_cast(smoId)]; } } // namespace sscl