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