Author: eadler
Date: Thu Dec  6 01:25:21 2012
New Revision: 243932
URL: http://svnweb.freebsd.org/changeset/base/243932

Log:
  Prefer the use of initalizer lists to ctor assignment.
  
  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 01:25:17 2012        (r243931)
+++ head/sbin/devd/devd.cc      Thu Dec  6 01:25:21 2012        (r243932)
@@ -248,9 +248,8 @@ action::do_action(config &c)
 }
 
 match::match(config &c, const char *var, const char *re)
-       : _var(var)
+       : _var(var), _re("^")
 {
-       _re = "^";
        if (!c.expand_string(string(re)).empty() &&
            c.expand_string(string(re)).at(0) == '!') {
                _re.append(c.expand_string(string(re)).substr(1));

Modified: head/sbin/devd/devd.hh
==============================================================================
--- head/sbin/devd/devd.hh      Thu Dec  6 01:25:17 2012        (r243931)
+++ head/sbin/devd/devd.hh      Thu Dec  6 01:25:21 2012        (r243932)
@@ -144,7 +144,7 @@ private:
 class config
 {
 public:
-       config() { _pidfile = ""; push_var_table(); }
+       config() : _pidfile("") { push_var_table(); }
        virtual ~config() { reset(); }
        void add_attach(int, event_proc *);
        void add_detach(int, event_proc *);
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to