change Module::self to reverse_iterator
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user