Skip to content
Snippets Groups Projects
Commit 345d5eb3 authored by Andreas Rempel's avatar Andreas Rempel
Browse files

Update main.cpp to fix n-tree usage

parent 36970126
Branches aa_score
No related tags found
No related merge requests found
......@@ -176,6 +176,15 @@ int main(int argc, char* argv[]) {
else if (filter == "weakly") {
// weakly compatible network
}
else if (filter.find("-tree") != -1 && filter.substr(filter.find("-tree")) == "-tree") {
for (const char &c: filter.substr(0, filter.find("-tree"))){
if (!isdigit(c)){
cerr << "Error: unexpected argument: --filter " << filter << ". Please specify n (Example usage: --filter 2-tree)" << endl;
return 1;
}
}
stoi(filter.substr(0, filter.find("-tree")));
}
else if (filter.find("tree") != -1 && filter.substr(filter.find("tree")) == "tree") {
for (const char &c: filter.substr(0, filter.find("tree"))){
if (!isdigit(c)){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment