Configuration parser bug fixed.
This commit is contained in:
parent
4db81af990
commit
a7de3bf08f
2 changed files with 2 additions and 2 deletions
|
@ -167,7 +167,7 @@ void Util::Config::printHelp(std::ostream & output){
|
|||
|
||||
/// Parses commandline arguments.
|
||||
/// Calls exit if an unknown option is encountered, printing a help message.
|
||||
void Util::Config::parseArgs(int argc, char ** argv){
|
||||
void Util::Config::parseArgs(int & argc, char ** & argv){
|
||||
int opt = 0;
|
||||
std::string shortopts;
|
||||
struct option * longOpts = (struct option*)calloc(long_count + 1, sizeof(struct option));
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace Util {
|
|||
Config(std::string cmd, std::string version);
|
||||
void addOption(std::string optname, JSON::Value option);
|
||||
void printHelp(std::ostream & output);
|
||||
void parseArgs(int argc, char ** argv);
|
||||
void parseArgs(int & argc, char ** & argv);
|
||||
JSON::Value & getOption(std::string optname, bool asArray = false);
|
||||
std::string getString(std::string optname);
|
||||
long long int getInteger(std::string optname);
|
||||
|
|
Loading…
Add table
Reference in a new issue