Verified Commit 6774c97d authored by JohnMH's avatar JohnMH

Add positional argument support

parent 8426e27a
Pipeline #2472 passed with stage
in 1 minute and 35 seconds
......@@ -184,7 +184,7 @@ int main(int argc, char* argv[]){
std::string fileToOpen = "";
if(optind < argc){
char* fnam = argv[optind];
fileToOpen = std::string(fileToOpen);
fileToOpen = std::string(fnam);
}
OBEngine* engine = new OBEngine();
......@@ -211,6 +211,11 @@ int main(int argc, char* argv[]){
}
#endif
shared_ptr<OBSerializer> serializer = engine->getSerializer();
if(serializer && !fileToOpen.empty()){
serializer->Load(fileToOpen);
}
engine->getDataModel()->getRunService()->Run();
shared_ptr<TaskScheduler> tasks = engine->getTaskScheduler();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment