diff options
author | Evan Martin <martine@danga.com> | 2012-05-07 04:23:49 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2012-05-07 04:23:49 (GMT) |
commit | 0559ce12dbac9fdb70b9fee4807010c7db20ac9c (patch) | |
tree | 3959c887f2a8902a6e1ff29fbef5ae59d4d9aa62 /src/graph.h | |
parent | cc0cf7aa6a51301a53b6b1870c0492f2e3fe35bb (diff) | |
parent | 6bbda7cba2c3c6476db39b73c7e901d9eee3b1e6 (diff) | |
download | Ninja-0559ce12dbac9fdb70b9fee4807010c7db20ac9c.zip Ninja-0559ce12dbac9fdb70b9fee4807010c7db20ac9c.tar.gz Ninja-0559ce12dbac9fdb70b9fee4807010c7db20ac9c.tar.bz2 |
Merge pull request #299 from tfarina/explicit-ctors
views: Mark single-argument constructors as explicit.
Diffstat (limited to 'src/graph.h')
-rw-r--r-- | src/graph.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/graph.h b/src/graph.h index afe4daf..32a859d 100644 --- a/src/graph.h +++ b/src/graph.h @@ -28,8 +28,11 @@ struct Edge; /// Information about a node in the dependency graph: the file, whether /// it's dirty, mtime, etc. struct Node { - Node(const string& path) : path_(path), mtime_(-1), dirty_(false), - in_edge_(NULL) {} + explicit Node(const string& path) + : path_(path), + mtime_(-1), + dirty_(false), + in_edge_(NULL) {} /// Return true if the file exists (mtime_ got a value). bool Stat(DiskInterface* disk_interface); @@ -97,7 +100,8 @@ private: /// An invokable build command and associated metadata (description, etc.). struct Rule { - Rule(const string& name) : name_(name), generator_(false), restat_(false) { } + explicit Rule(const string& name) + : name_(name), generator_(false), restat_(false) {} const string& name() const { return name_; } |