From owner-svn-src-all@FreeBSD.ORG Thu Dec 6 01:25:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8990A6A0; Thu, 6 Dec 2012 01:25:15 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 54AAE8FC0C; Thu, 6 Dec 2012 01:25:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qB61PF8H027193; Thu, 6 Dec 2012 01:25:15 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qB61PFb8027191; Thu, 6 Dec 2012 01:25:15 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201212060125.qB61PFb8027191@svn.freebsd.org> From: Eitan Adler Date: Thu, 6 Dec 2012 01:25:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243930 - head/sbin/devd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Dec 2012 01:25:15 -0000 Author: eadler Date: Thu Dec 6 01:25:14 2012 New Revision: 243930 URL: http://svnweb.freebsd.org/changeset/base/243930 Log: Constify where possible Approved by: cperciva MFC after: 2 weeks Modified: head/sbin/devd/devd.cc head/sbin/devd/devd.hh Modified: head/sbin/devd/devd.cc ============================================================================== --- head/sbin/devd/devd.cc Thu Dec 6 00:49:59 2012 (r243929) +++ head/sbin/devd/devd.cc Thu Dec 6 01:25:14 2012 (r243930) @@ -151,7 +151,7 @@ event_proc::add(eps *eps) } bool -event_proc::matches(config &c) +event_proc::matches(config &c) const { vector::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::const_iterator i; @@ -436,7 +436,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()); } @@ -577,7 +577,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: head/sbin/devd/devd.hh ============================================================================== --- head/sbin/devd/devd.hh Thu Dec 6 00:49:59 2012 (r243929) +++ head/sbin/devd/devd.hh Thu Dec 6 01:25:14 2012 (r243930) @@ -134,8 +134,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 _epsvec; @@ -170,7 +170,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 _dir_list;