Remove NULL check for pref because pref is always non NULL

pull/89/head
Tatsuhiro Tsujikawa 2013-05-15 22:51:35 +09:00
parent fc0982587b
commit a4a4a10490
2 changed files with 0 additions and 8 deletions

View File

@ -90,10 +90,6 @@ void gatherOption
for(; first != last; ++first) {
const std::string& optionName = (*first).first;
const Pref* pref = option::k2p(optionName);
if(!pref) {
throw DL_ABORT_EX
(fmt("We don't know how to deal with %s option", optionName.c_str()));
}
const OptionHandler* handler = optionParser->find(pref);
if(!handler || !pred(handler)) {
// Just ignore the unacceptable options in this context.

View File

@ -205,10 +205,6 @@ void apiGatherOption
for(; first != last; ++first) {
const std::string& optionName = (*first).first;
const Pref* pref = option::k2p(optionName);
if(!pref) {
throw DL_ABORT_EX
(fmt("We don't know how to deal with %s option", optionName.c_str()));
}
const OptionHandler* handler = optionParser->find(pref);
if(!handler || !pred(handler)) {
// Just ignore the unacceptable options in this context.