mindThread: remove parent ref; might remove class entirely

This commit is contained in:
2026-02-19 19:20:21 -04:00
parent ab399cafeb
commit 8011fe12bc
2 changed files with 8 additions and 15 deletions
+3 -10
View File
@@ -12,19 +12,12 @@ class MindThread
: public sscl::PuppetThread
{
public:
MindThread(sscl::ThreadId _id, Mind& parent)
: sscl::PuppetThread(_id),
parent(parent)
{
}
Mind& getParent() const { return parent; }
MindThread(sscl::ThreadId _id)
: sscl::PuppetThread(_id)
{}
protected:
void handleException() override;
public:
Mind& parent;
};
} // namespace smo
+5 -5
View File
@@ -17,12 +17,12 @@ namespace smo {
Mind::Mind(void)
: sscl::PuppetApplication(
std::vector<std::shared_ptr<sscl::PuppetThread>>{
std::make_shared<MindThread>(SmoThreadId::DIRECTOR, *this),
std::make_shared<MindThread>(SmoThreadId::SIMULATOR, *this),
std::make_shared<MindThread>(SmoThreadId::SUBCONSCIOUS, *this),
std::make_shared<MindThread>(SmoThreadId::BODY, *this)
std::make_shared<MindThread>(SmoThreadId::DIRECTOR),
std::make_shared<MindThread>(SmoThreadId::SIMULATOR),
std::make_shared<MindThread>(SmoThreadId::SUBCONSCIOUS),
std::make_shared<MindThread>(SmoThreadId::BODY)
#ifndef CONFIG_WORLD_USE_BODY_THREAD
, std::make_shared<MindThread>(SmoThreadId::WORLD, *this)
, std::make_shared<MindThread>(SmoThreadId::WORLD)
#endif
}
),