mirror of
https://github.com/tanakh/cmdline.git
synced 2025-02-17 14:09:28 +08:00
add const to cmdline::exist()
This commit is contained in:
parent
e5aa3da6d5
commit
92555fc050
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user