[Midnightbsd-cvs] src [8723] trunk/sbin/devd: constify
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sun Sep 25 18:33:40 EDT 2016
Revision: 8723
http://svnweb.midnightbsd.org/src/?rev=8723
Author: laffer1
Date: 2016-09-25 18:33:40 -0400 (Sun, 25 Sep 2016)
Log Message:
-----------
constify
Modified Paths:
--------------
trunk/sbin/devd/devd.cc
trunk/sbin/devd/devd.hh
Modified: trunk/sbin/devd/devd.cc
===================================================================
--- trunk/sbin/devd/devd.cc 2016-09-25 22:33:17 UTC (rev 8722)
+++ trunk/sbin/devd/devd.cc 2016-09-25 22:33:40 UTC (rev 8723)
@@ -151,7 +151,7 @@
}
bool
-event_proc::matches(config &c)
+event_proc::matches(config &c) const
{
vector<eps *>::const_iterator i;
@@ -162,7 +162,7 @@
}
bool
-event_proc::run(config &c)
+event_proc::run(config &c) const
{
vector<eps *>::const_iterator i;
@@ -426,7 +426,7 @@
class epv_greater {
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());
}
@@ -567,7 +567,7 @@
}
bool
-config::is_id_char(char ch)
+config::is_id_char(char ch) const
{
return (ch != '\0' && (isalpha(ch) || isdigit(ch) || ch == '_' ||
ch == '-'));
Modified: trunk/sbin/devd/devd.hh
===================================================================
--- trunk/sbin/devd/devd.hh 2016-09-25 22:33:17 UTC (rev 8722)
+++ trunk/sbin/devd/devd.hh 2016-09-25 22:33:40 UTC (rev 8723)
@@ -133,8 +133,8 @@
int get_priority() const { return (_prio); }
void set_priority(int prio) { _prio = prio; }
void add(eps *);
- bool matches(config &);
- bool run(config &);
+ bool matches(config &) const;
+ bool run(config &) const;
private:
int _prio;
std::vector<eps *> _epsvec;
@@ -169,7 +169,7 @@
void parse_one_file(const char *fn);
void parse_files_in_dir(const char *dirname);
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);
private:
std::vector<std::string> _dir_list;
More information about the Midnightbsd-cvs
mailing list