mirror of https://github.com/aria2/aria2
Remove NULL check for pref because pref is always non NULL
parent
fc0982587b
commit
a4a4a10490
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue