mirror of
https://github.com/CLIUtils/CLI11.git
synced 2025-05-03 14:03:52 +00:00
Dropping useless check that could not be tested
This commit is contained in:
parent
2d8d659ab1
commit
675e753661
@ -283,9 +283,6 @@ class Option : public OptionBase<Option> {
|
|||||||
ignore_case_ = value;
|
ignore_case_ = value;
|
||||||
auto *parent = dynamic_cast<T *>(parent_);
|
auto *parent = dynamic_cast<T *>(parent_);
|
||||||
|
|
||||||
if(parent == nullptr)
|
|
||||||
throw IncorrectConstruction("This should not happen, there is always a parent!");
|
|
||||||
|
|
||||||
for(const Option_p &opt : parent->options_)
|
for(const Option_p &opt : parent->options_)
|
||||||
if(opt.get() != this && *opt == *this)
|
if(opt.get() != this && *opt == *this)
|
||||||
throw OptionAlreadyAdded(opt->get_name());
|
throw OptionAlreadyAdded(opt->get_name());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user