From a7de3bf08f171f72439cfdae151236de1485f4b3 Mon Sep 17 00:00:00 2001 From: Erik Zandvliet Date: Wed, 24 Apr 2013 10:25:34 +0200 Subject: [PATCH] Configuration parser bug fixed. --- lib/config.cpp | 2 +- lib/config.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/config.cpp b/lib/config.cpp index c083d5ec..829aa1b4 100644 --- a/lib/config.cpp +++ b/lib/config.cpp @@ -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)); diff --git a/lib/config.h b/lib/config.h index c776c21b..8ed0fb5d 100644 --- a/lib/config.h +++ b/lib/config.h @@ -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);