Fixed incorrect get_params function signature
This commit is contained in:
+2
-3
@@ -17,7 +17,6 @@ ProgramOptions get_params(int argc, char *argv[])
|
|||||||
{0, 0, 0, 0 }
|
{0, 0, 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
bool seed_found = false;
|
|
||||||
int option, option_index, seed = 0;
|
int option, option_index, seed = 0;
|
||||||
while (( option = getopt_long(argc, argv, "m:n:s:", long_options, &option_index)))
|
while (( option = getopt_long(argc, argv, "m:n:s:", long_options, &option_index)))
|
||||||
{
|
{
|
||||||
@@ -37,7 +36,7 @@ ProgramOptions get_params(int argc, char *argv[])
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 's':
|
case 's':
|
||||||
seed_found = true;
|
is_seed_specified = true;
|
||||||
seed = atoi(optarg);
|
seed = atoi(optarg);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -46,5 +45,5 @@ ProgramOptions get_params(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return {max_range, num_entries, seed_found ? std::optional<int>(seed): std::nullopt};
|
return {max_range, num_entries, is_seed_specified ? std::optional<int>(seed): std::nullopt};
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -9,4 +9,4 @@ struct ProgramOptions
|
|||||||
std::optional<int> seed;
|
std::optional<int> seed;
|
||||||
};
|
};
|
||||||
|
|
||||||
ProgramOptions get_params();
|
ProgramOptions get_params(int argc, char *argv[]);
|
||||||
|
|||||||
Reference in New Issue
Block a user