- char** options = &argv[1];
- while (not strncmp(options[0], "-", 1)) {
- unsigned int length = strlen("-nb_bits=");
- if (not strncmp(options[0], "-nb_bits=", length) && strlen(options[0]) > length) {
- nb_bits = static_cast<int>(xbt_str_parse_int(options[0] + length, "Invalid nb_bits parameter"));
+ std::string platform_file(argv[argc - 2]);
+ std::string deployment_file(argv[argc - 1]);
+ for (const auto& option : std::vector<std::string>(argv + 1, argv + argc - 2)) {
+ if (option.rfind("-nb_bits=", 0) == 0) {
+ nb_bits = std::stod(option.substr(option.find('=') + 1));