getopt.add_option( "sim-speed", sim_speed, GetOpt::REQUIRED_ARG);
getopt.add_option('n', "network", network, GetOpt::NO_ARG);
getopt.add_option( "state", state_fn, GetOpt::REQUIRED_ARG);
+ getopt.add_argument("layout", layout_fn, GetOpt::REQUIRED_ARG);
getopt(argc, argv);
if(!res.empty())
throw usage_error("Invalid resolution");
}
- const vector<string> &args = getopt.get_args();
- if(args.empty())
- throw usage_error("No layout given");
-
- layout_fn = args[0];
-
if(state_fn.empty())
state_fn = FS::basepart(layout_fn)+".state";
}