2009-02-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Fixed the bug that the boolean options that don't take arguments
	don't work.
	* src/OptionHandlerImpl.h
pull/1/head
Tatsuhiro Tsujikawa 2009-02-11 07:46:15 +00:00
parent a2c3c54386
commit a8376a5c4b
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2009-02-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that the boolean options that don't take arguments
don't work.
* src/OptionHandlerImpl.h
2009-02-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 2009-02-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed broken selected file BitTorrent download. Fixed broken selected file BitTorrent download.

View File

@ -117,7 +117,9 @@ public:
virtual void parseArg(Option& option, const std::string& optarg) virtual void parseArg(Option& option, const std::string& optarg)
{ {
if(optarg == "true" || if(optarg == "true" ||
(_argType == OptionHandler::OPT_ARG && optarg.empty())) { ((_argType == OptionHandler::OPT_ARG ||
_argType == OptionHandler::NO_ARG)
&& optarg.empty())) {
option.put(_optName, V_TRUE); option.put(_optName, V_TRUE);
} else if(optarg == "false") { } else if(optarg == "false") {
option.put(_optName, V_FALSE); option.put(_optName, V_FALSE);