mirror of
https://github.com/cuberite/TCLAP.git
synced 2025-09-09 20:33:39 -04:00
SwitchArg interface change
This commit is contained in:
parent
e7f9d30e5d
commit
6652bf6577
@ -37,7 +37,7 @@ void parseOptions(int argc, char** argv)
|
|||||||
// Define arguments
|
// Define arguments
|
||||||
//
|
//
|
||||||
|
|
||||||
SwitchArg btest("B","existTestB", "exist Test B", false, cmd );
|
SwitchArg btest("B","existTestB", "exist Test B", cmd, false);
|
||||||
|
|
||||||
ValueArg<string> stest("s", "stringTest", "string test", true, "homer",
|
ValueArg<string> stest("s", "stringTest", "string test", true, "homer",
|
||||||
"string", cmd );
|
"string", cmd );
|
||||||
|
@ -62,7 +62,7 @@ class SwitchArg : public Arg
|
|||||||
SwitchArg(const std::string& flag,
|
SwitchArg(const std::string& flag,
|
||||||
const std::string& name,
|
const std::string& name,
|
||||||
const std::string& desc,
|
const std::string& desc,
|
||||||
bool def,
|
bool def = false,
|
||||||
Visitor* v = NULL);
|
Visitor* v = NULL);
|
||||||
|
|
||||||
|
|
||||||
@ -82,8 +82,8 @@ class SwitchArg : public Arg
|
|||||||
SwitchArg(const std::string& flag,
|
SwitchArg(const std::string& flag,
|
||||||
const std::string& name,
|
const std::string& name,
|
||||||
const std::string& desc,
|
const std::string& desc,
|
||||||
bool def,
|
|
||||||
CmdLineInterface& parser,
|
CmdLineInterface& parser,
|
||||||
|
bool def = false,
|
||||||
Visitor* v = NULL);
|
Visitor* v = NULL);
|
||||||
|
|
||||||
|
|
||||||
@ -125,8 +125,8 @@ inline SwitchArg::SwitchArg(const std::string& flag,
|
|||||||
inline SwitchArg::SwitchArg(const std::string& flag,
|
inline SwitchArg::SwitchArg(const std::string& flag,
|
||||||
const std::string& name,
|
const std::string& name,
|
||||||
const std::string& desc,
|
const std::string& desc,
|
||||||
bool _default,
|
|
||||||
CmdLineInterface& parser,
|
CmdLineInterface& parser,
|
||||||
|
bool _default,
|
||||||
Visitor* v )
|
Visitor* v )
|
||||||
: Arg(flag, name, desc, false, false, v),
|
: Arg(flag, name, desc, false, false, v),
|
||||||
_value( _default )
|
_value( _default )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user