change Module::self to reverse_iterator

This commit is contained in:
2025-03-14 16:23:48 -05:00
parent 6ddae4291d
commit ad6386c36b
2 changed files with 3 additions and 3 deletions

View File

@@ -70,8 +70,8 @@ void App::load(std::string lib) {
}
}
m->setSelf(modules.end());
modules.push_back(m);
m->setSelf(modules.rbegin());
}
void App::unload(std::list<Module*>::iterator it) {

View File

@@ -17,12 +17,12 @@ class Module {
std::string getName() const { return name; }
void* getHandle() { return handle; }
void setSelf(std::list<Module*>::iterator s) { self = s; }
void setSelf(std::list<Module*>::reverse_iterator s) { self = s; }
protected:
std::string name;
void* handle;
std::list<Module*>::iterator self;
std::list<Module*>::reverse_iterator self;
App& app;