Fixed compiler warning is getoptplusplus

Former-commit-id: ab8f29c2652d7905dd267ae41530e2d37c6ab488
This commit is contained in:
T. van der Zwan 2013-12-19 21:02:02 +00:00
parent e6fb2ad53c
commit c4e20d0d36
2 changed files with 6 additions and 6 deletions

View File

@ -45,7 +45,7 @@ void OptionsParser::parse(int argc, const char* argv[]) throw(runtime_error)
vector<string> v(&argv[1], &argv[argc]);
ParserState state(*this, v);
ParserState state(/* *this,*/ v);
for(; !state.end(); state.advance()) {
@ -164,7 +164,7 @@ Parameter& ParameterSet::operator[](char c) const {
for(std::list<Parameter*>::const_iterator i = parameters.begin(); i!= parameters.end(); i++) {
if((*i)->shortOption() == c) return *(*i);
}
throw out_of_range("ParameterSet["+c+string("]"));
throw out_of_range("ParameterSet["+string(&c)+string("]"));
}
@ -185,8 +185,8 @@ Parameter& ParameterSet::operator[](const string& param) const {
*/
ParserState::ParserState(OptionsParser &opts, vector<string>& args) :
opts(opts), arguments(args), iterator(args.begin())
ParserState::ParserState(/*OptionsParser &opts, */vector<string>& args) :
/*opts(opts),*/ arguments(args), iterator(args.begin())
{
}

View File

@ -129,11 +129,11 @@ public:
void advance();
bool end() const;
protected:
ParserState(OptionsParser &opts, std::vector<std::string>& args);
ParserState(/*OptionsParser &opts,*/ std::vector<std::string>& args);
private:
friend class OptionsParser;
OptionsParser &opts;
// OptionsParser &opts;
const std::vector<std::string> &arguments;
std::vector<std::string>::const_iterator iterator;
};