1
0
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:
Henry Fredrick Schreiner 2017-11-20 16:52:51 -05:00 committed by Henry Schreiner
parent 2d8d659ab1
commit 675e753661

View File

@ -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());