mirror of
https://github.com/CLIUtils/CLI11.git
synced 2025-04-30 04:33:53 +00:00
Dropping check for size in test (not needed anymore)
This commit is contained in:
parent
46f192bb95
commit
97b6265cee
@ -9,8 +9,6 @@ using cx = std::complex<double>;
|
|||||||
CLI::Option *
|
CLI::Option *
|
||||||
add_option(CLI::App &app, std::string name, cx &variable, std::string description = "", bool defaulted = false) {
|
add_option(CLI::App &app, std::string name, cx &variable, std::string description = "", bool defaulted = false) {
|
||||||
CLI::callback_t fun = [&variable](CLI::results_t res) {
|
CLI::callback_t fun = [&variable](CLI::results_t res) {
|
||||||
if(res.size() != 2)
|
|
||||||
return false;
|
|
||||||
double x, y;
|
double x, y;
|
||||||
bool worked = CLI::detail::lexical_cast(res[0], x) && CLI::detail::lexical_cast(res[1], y);
|
bool worked = CLI::detail::lexical_cast(res[0], x) && CLI::detail::lexical_cast(res[1], y);
|
||||||
if(worked)
|
if(worked)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user