add const to cmdline::exist()

This commit is contained in:
tanakh 2010-07-27 14:41:33 +09:00
parent e5aa3da6d5
commit 92555fc050

View File

@ -348,9 +348,9 @@ public:
prog_name=name;
}
bool exist(const std::string &name){
bool exist(const std::string &name) const {
if (options.count(name)==0) throw cmdline_error("there is no flag: --"+name);
return options[name]->has_set();
return options.find(name)->second->has_set();
}
template <class T>