Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Feb 2013 00:34:33 +0000 (UTC)
From:      Eitan Adler <eadler@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r246309 - stable/9/sbin/devd
Message-ID:  <201302040034.r140YXFL006537@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: eadler
Date: Mon Feb  4 00:34:33 2013
New Revision: 246309
URL: http://svnweb.freebsd.org/changeset/base/246309

Log:
  MFC r243930:
  	Constify where possible
  
  Approved by:	cperciva (mentor, implicit)

Modified:
  stable/9/sbin/devd/devd.cc
  stable/9/sbin/devd/devd.hh
Directory Properties:
  stable/9/sbin/devd/   (props changed)

Modified: stable/9/sbin/devd/devd.cc
==============================================================================
--- stable/9/sbin/devd/devd.cc	Sun Feb  3 23:54:30 2013	(r246308)
+++ stable/9/sbin/devd/devd.cc	Mon Feb  4 00:34:33 2013	(r246309)
@@ -151,7 +151,7 @@ event_proc::add(eps *eps)
 }
 
 bool
-event_proc::matches(config &c)
+event_proc::matches(config &c) const
 {
 	vector<eps *>::const_iterator i;
 
@@ -162,7 +162,7 @@ event_proc::matches(config &c)
 }
 
 bool
-event_proc::run(config &c)
+event_proc::run(config &c) const
 {
 	vector<eps *>::const_iterator i;
 		
@@ -426,7 +426,7 @@ config::parse_files_in_dir(const char *d
 
 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 @@ config::get_variable(const string &var)
 }
 
 bool
-config::is_id_char(char ch)
+config::is_id_char(char ch) const
 {
 	return (ch != '\0' && (isalpha(ch) || isdigit(ch) || ch == '_' || 
 	    ch == '-'));

Modified: stable/9/sbin/devd/devd.hh
==============================================================================
--- stable/9/sbin/devd/devd.hh	Sun Feb  3 23:54:30 2013	(r246308)
+++ stable/9/sbin/devd/devd.hh	Mon Feb  4 00:34:33 2013	(r246309)
@@ -133,8 +133,8 @@ public:
 	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 @@ protected:
 	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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302040034.r140YXFL006537>