소스 검색

Remove NULL check for pref because pref is always non NULL

Tatsuhiro Tsujikawa 12 년 전
부모
커밋
a4a4a10490
2개의 변경된 파일0개의 추가작업 그리고 8개의 파일을 삭제
  1. 0 4
      src/RpcMethod.cc
  2. 0 4
      src/aria2api.cc

+ 0 - 4
src/RpcMethod.cc

@@ -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.

+ 0 - 4
src/aria2api.cc

@@ -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.