work?
This commit is contained in:
@@ -47,6 +47,7 @@ bool App::load(std::string lib, std::list<std::string> blacklist = {}) {
|
||||
|
||||
Module* m = create(h, App::Get());
|
||||
|
||||
if(!blacklist.empty()) {
|
||||
for(auto it = blacklist.begin(); it != blacklist.end(); it++) {
|
||||
if(*it == m->getName()) {
|
||||
std::cout << "Module \"" << *it << "\" is already loaded!\n";
|
||||
@@ -55,11 +56,12 @@ bool App::load(std::string lib, std::list<std::string> blacklist = {}) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
blacklist.push_back(m->getName());
|
||||
|
||||
if(!m->deps.empty()) {
|
||||
bool skip = false;
|
||||
|
||||
for(auto s = blacklist.begin(); s != blacklist.end(); s++) {
|
||||
auto it = m->deps.find(*s);
|
||||
if(it != m->deps.end())
|
||||
@@ -71,6 +73,7 @@ bool App::load(std::string lib, std::list<std::string> blacklist = {}) {
|
||||
load(it->second, blacklist);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
modules.push_back(m);
|
||||
|
||||
Reference in New Issue
Block a user