mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Fixed compiler warning is getoptplusplus
Former-commit-id: ab8f29c2652d7905dd267ae41530e2d37c6ab488
This commit is contained in:
parent
e6fb2ad53c
commit
c4e20d0d36
@ -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())
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -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;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user