Mercurial > hg > octave-lyh
diff liboctave/dir-ops.h @ 11501:331fcc41ca23
data member initialization fixes
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 13 Jan 2011 03:04:51 -0500 |
parents | cbc402e64d83 |
children | fd0a3ac60b0e |
line wrap: on
line diff
--- a/liboctave/dir-ops.h +++ b/liboctave/dir-ops.h @@ -33,18 +33,25 @@ { public: - dir_entry (const std::string& n = std::string ()) : name (n), dir (0) + dir_entry (const std::string& n = std::string ()) + : name (n), dir (0), fail (false), errmsg () { if (! name.empty ()) open (); } - dir_entry (const dir_entry& d) { copy (d); } + dir_entry (const dir_entry& d) + : name (d.name), dir (d.dir), fail (d.fail), errmsg (d.errmsg) { } dir_entry& operator = (const dir_entry& d) { if (this != &d) - copy (d); + { + name = d.name; + dir = d.dir; + fail = d.fail; + errmsg = d.errmsg; + } return *this; } @@ -78,8 +85,6 @@ // If a failure occurs, this contains the system error text. std::string errmsg; - - void copy (const dir_entry&); }; #endif