Constify where possible
Approved by: cperciva MFC after: 2 weeks
This commit is contained in:
parent
3145eea56c
commit
be40a13e59
@ -151,7 +151,7 @@ event_proc::add(eps *eps)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
event_proc::matches(config &c)
|
event_proc::matches(config &c) const
|
||||||
{
|
{
|
||||||
vector<eps *>::const_iterator i;
|
vector<eps *>::const_iterator i;
|
||||||
|
|
||||||
@ -162,7 +162,7 @@ event_proc::matches(config &c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
event_proc::run(config &c)
|
event_proc::run(config &c) const
|
||||||
{
|
{
|
||||||
vector<eps *>::const_iterator i;
|
vector<eps *>::const_iterator i;
|
||||||
|
|
||||||
@ -436,7 +436,7 @@ config::parse_files_in_dir(const char *dirname)
|
|||||||
|
|
||||||
class epv_greater {
|
class epv_greater {
|
||||||
public:
|
public:
|
||||||
int operator()(event_proc *const&l1, event_proc *const&l2)
|
int operator()(event_proc *const&l1, event_proc *const&l2) const
|
||||||
{
|
{
|
||||||
return (l1->get_priority() > l2->get_priority());
|
return (l1->get_priority() > l2->get_priority());
|
||||||
}
|
}
|
||||||
@ -577,7 +577,7 @@ config::get_variable(const string &var)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
config::is_id_char(char ch)
|
config::is_id_char(char ch) const
|
||||||
{
|
{
|
||||||
return (ch != '\0' && (isalpha(ch) || isdigit(ch) || ch == '_' ||
|
return (ch != '\0' && (isalpha(ch) || isdigit(ch) || ch == '_' ||
|
||||||
ch == '-'));
|
ch == '-'));
|
||||||
|
@ -134,8 +134,8 @@ public:
|
|||||||
int get_priority() const { return (_prio); }
|
int get_priority() const { return (_prio); }
|
||||||
void set_priority(int prio) { _prio = prio; }
|
void set_priority(int prio) { _prio = prio; }
|
||||||
void add(eps *);
|
void add(eps *);
|
||||||
bool matches(config &);
|
bool matches(config &) const;
|
||||||
bool run(config &);
|
bool run(config &) const;
|
||||||
private:
|
private:
|
||||||
int _prio;
|
int _prio;
|
||||||
std::vector<eps *> _epsvec;
|
std::vector<eps *> _epsvec;
|
||||||
@ -170,7 +170,7 @@ protected:
|
|||||||
void parse_one_file(const char *fn);
|
void parse_one_file(const char *fn);
|
||||||
void parse_files_in_dir(const char *dirname);
|
void parse_files_in_dir(const char *dirname);
|
||||||
void expand_one(const char *&src, std::string &dst);
|
void expand_one(const char *&src, std::string &dst);
|
||||||
bool is_id_char(char);
|
bool is_id_char(char) const;
|
||||||
bool chop_var(char *&buffer, char *&lhs, char *&rhs);
|
bool chop_var(char *&buffer, char *&lhs, char *&rhs);
|
||||||
private:
|
private:
|
||||||
std::vector<std::string> _dir_list;
|
std::vector<std::string> _dir_list;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user